Re:No More Cheap Shipping for Chinese Sellers
by ComputerGuru on Tuesday August 27, 2019 @11:47AM
(#20810895)
Yes, but try codifying that and you won’t get far enough to make that comparison. E.g. mentally or on a computer, ‘Date.Parse(“2019-09-31”)’ is an error ;)
[ Parent
| on HN ]
Re:No More Cheap Shipping for Chinese Sellers
by freehunter on Tuesday August 27, 2019 @12:00PM
(#20811084)
Any properly defined software should take a date that doesn't exist and move it forward or backward to a date that does. Leap years would crash every computer every February if that wasn't taken into account.
Re:No More Cheap Shipping for Chinese Sellers
by StyloW on Tuesday August 27, 2019 @01:28PM
(#20812274)
Except that the whole February/leap year case is part of the Gregorian calendar. Moving the date forward or backward to a date that does exist is not a set rule and would only cause unnecessary confusion for a user or other developer for that matter; even worse if you were to do it without notifying the user. Wouldn't you agree that it'd just be better to catch the error and tell the user they "done messed up"?