Follow

Is there a web app somewhere that I can input arbitrary chinese lunar calendar dates to, and it will generate an ical feed for my calendar app?

I know Mac/iOS contacts app lets you save lunar birthdays, and that shows up on the calendar, but what about non-birthdays?

· · Web · 1 · 0 · 0

@gueorgui i could write one. might be fun.
or terrible.
either way, icalendar is not a difficult format to generate, could start with an hcal to ical converter. hmm...

@zens Been toying with the idea myself. The hard part is not generating the ical feed, but converting lunar to solar, apparently.

@gueorgui I am well aware, and have attempted to do so before, specifically to try and write a function that could produce the list of chinese new years accurately, from first principles, I could only get up to 80% accuracy, so there's gotta be a trick to it.

@zens According to this: github.com/infinet/lunar-calen there's some data produced by the Hong Kong observatory that can be useful, but I can't say I've looked into it deeply enough to understand anything.

@gueorgui If that's the case, it might not be possible to do it from first principles.
you might just need a big old database.

@gueorgui in honesty, depending on how accurate you want to get it, you probably just need the list of new years days for whichever span of time you want to cover.

@gueorgui then, once you have that, I don't know, look up how many days in each month, and you're halfway there.

@zens Agree with your analysis and it seems simple enough. But the fact that no such tools come up in searching the web makes me think (given the potentially huge audience for such a service) that things might not be just as simple!

@gueorgui this conversion calculator came up on my search
prokerala.com/general/calendar

laden with ads, but I assume it works, though I haven't checked its accuracy. the main part of your requirements list not there is icalendar output.

@zens Yeah, I saw this, and this helps on an ad-hoc basis (My arbitrary guess is that people are using it to find out their lunar birthdays in order to work out horoscopes and the like). But if for example I want to be reminded every year of when the Ghost Festival starts so I can prepare for it, that doesn't help.

@gueorgui so the github link you sent earlier has the link to the database you need!

@zens Ahh yes. So in essence this project just became "write some classes that wrap around a bunch of text files." 😆

@gueorgui [looks]
gosh, I guess so. Those files are pretty much just the lookup tables for each day of each year, aren't they?

@zens Yeah, so no from-first-principles calculations needed, for this particular case.

@gueorgui I finally mentally processed the bit in the github where it explains *how* to computer from first principles, and there's actually two problem cases which involve leap seconds near midnight…. which means, It's actually impossible to get 100% accurate without a database of leap seconds getting involved.

Sign in to participate in the conversation
Merveilles

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.