Timeline for Most recent fixed date (i.e. 4th July) before given date
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 1, 2016 at 9:23 | vote | accept | Gareth | ||
Nov 21, 2016 at 20:06 | answer | added | Rick James | timeline score: 1 | |
Nov 21, 2016 at 13:35 | comment | added | Andriy M | Feel free to answer with your own solution if/when you've figured out one. | |
Nov 21, 2016 at 13:15 | comment | added | Gareth | @AndriyM Yes, that's essentially what I want to do. I suppose by best I mean the least hacky way of doing it. Having read your simpler way of expressing it, it's occurred to me that what I need to do is take the day and month of date S and append the year of date C - if this new date is before date C return it, otherwise return the day and month of date S with the year of date C - 1. | |
Nov 21, 2016 at 12:25 | comment | added | Andriy M | In other words, given dates S and C, you want to subtract one year from date S iteratively until it falls before date C (unless it's already before date C), correct? On a different note, what do you mean by "best" in "what would be the best way…"? | |
Nov 21, 2016 at 10:20 | review | First posts | |||
Nov 21, 2016 at 12:25 | |||||
Nov 21, 2016 at 10:19 | history | asked | Gareth | CC BY-SA 3.0 |