Talk:Discordian date: Difference between revisions

(→‎D Entry: constants)
(→‎Broken examples: new section)
Line 37:
 
- Currently the format() function is not pure nor nothrow, but maybe in future it will become pure. So I keep some commented out code like /*pure*/ that are meant to be replaced by code in future if and when Phobos improves (I replace such comments all the time in Rosettacode entries because Phobos keeps improving).
 
== Broken examples ==
 
It seems this task has been rather poorly implemented, possibly because one of the original examples was incorrect, and others have just translated that directly. I've marked about a dozen as incorrect so far (some of which have already been fixed), but I'm fairly sure there are more that are wrong.
 
The easiest mistake to spot is anything that calculates the day number with a simple modulo operation since that is bound to give you a zero day at some point, which would never be correct. Examples that appear to have this mistake that I haven't flagged yet include [[Discordian_date#Euphoria|Euphoria]], [[Discordian_date#Mathematica|Mathematica]], [[Discordian_date#PureBasic|PureBasic]] and [[Discordian_date#Racket|Racket]]. I don't want to mark anything incorrect that I haven't been able to verify directly, though, so I'm hoping others can confirm whether those are right or wrong.
 
The handling of leap years seem to be another source of confusion, so that's also something worth testing thoroughly if you want to be sure that your example is truly correct.
 
--[[User:J4 james|j4_james]] ([[User talk:J4 james|talk]]) 12:38, 7 October 2015 (UTC)
Anonymous user