I forgot about this. This looks interesting, though convoluted. I've added it to my "todo" so maybe I won't forget.
On Tuesday, August 20, 2019 at 12:18:41 PM UTC-7, Mat wrote: > > Hi Mark > > I found this algo > > > https://web.archive.org/web/20170507133619/https://alcor.concordia.ca/~gpkatch/gdate-algorithm.html > > It should be enough with our new math functions. As an experiment I made > the first part (the g function): > > \define g(y, m, d) > <$set name=m value={{{ [[$m$]add[9]remainder[12]] }}}> > <$set name=y value={{{ [<m>divide[10]subtract[$y$]negate[]] }}}> > <$set name=y4 value={{{ [<y>add[4]] }}}> > <$set name=y100 value={{{ [<y>divide[100]] }}}> > <$set name=y400 value={{{ [<y>divide[400]] }}}> > <$set name=m3 value={{{ [<m>multiply[306]add[5]divide[10]] }}}> > {{{ > [[365]multiply<y>add<y4>subtract<y100>add<y400>add<m3>add[$d$]subtract[1]] > }}} > </$set></$set></$set></$set></$set></$set> > \end > > This seems to work but it is only half of what is needed so I can't tell > for sure. What you're asking for is > > d(g(y,m,d) + n) > > > which thus requires the d function and maybe also to mess a bit with the > <<now>> macro to extract the desired bits. Or maybe it could be integrated > into the function for a more elegant solution. > > Tell me if you need more help and I'll fiddle a bit more. I'm a bit heavy > on work for some time but I'm a tiddly junkie so small and well defined > bits like these... > > <:-) > > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0fe41b7f-e750-44c1-bebe-6d369a87598f%40googlegroups.com.

