Re: Date Math bug
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16870
interpreted = N
texte = >The concept is, as you have deduced, adding numbers to a particular field>doesn't change the others. This is only ambiguous in the month case. If you>want the last day of the next month when the next month is shorter, should>2/28/1998 + 1 month go to 3/28/1998 or 3/31/1998? This is the ambiguous part.>I don't think it's very ambiguous. 2+1 is 3, so logically it should be3/28/1998 in this case. If day x is valid in the target month and, thenjust change the month as indicated. The tricky part is going from longmonth to short month. If x=29,30, or 31 and doesn't exist in the targetmonth, then additionally change the day of the month to the last validvalue of that month. It seems more consistent than incrementing to thenext month, from our viewpoint anyway.>If you always wanted the last day of the next month, you could do some WebDNA>that figured out the number of days in the next month and added it to the>current date. This is not as clean, but workable. I hope this helps.>Yes, not nearly as clean. However, I (we) would still appreciate the moreelegant solution I described above.>John.>>>[MATH DATE]{03/31/1998}+{01/00/0000}[/MATH]>>returns>>05/01/1998>>>>While I understand that May 1st is being interpreted as April 31st, I>>consider this a bug. Adding 1 month to the last day of the month should>>give the last day of the next month.>>>>Michael>>>>Michael Winston *By Phone!: (503)/652/8815 x341>> John A. Hill, V.P. MarketingThanks,Dale ________________________ ___________________________| Dale LaFountain | mailto:dalel@dhorse.com || MIS Director,WebMaster | http://www.dhorse.com/ || Dark Horse Comics, Inc.| Phone: 503-652-8815 x324 |\________________________|___________________________/
Associated Messages, from the most recent to the oldest:
>The concept is, as you have deduced, adding numbers to a particular field>doesn't change the others. This is only ambiguous in the month case. If you>want the last day of the next month when the next month is shorter, should>2/28/1998 + 1 month go to 3/28/1998 or 3/31/1998? This is the ambiguous part.>I don't think it's very ambiguous. 2+1 is 3, so logically it should be3/28/1998 in this case. If day x is valid in the target month and, thenjust change the month as indicated. The tricky part is going from longmonth to short month. If x=29,30, or 31 and doesn't exist in the targetmonth, then additionally change the day of the month to the last validvalue of that month. It seems more consistent than incrementing to thenext month, from our viewpoint anyway.>If you always wanted the last day of the next month, you could do some WebDNA>that figured out the number of days in the next month and added it to the>current date. This is not as clean, but workable. I hope this helps.>Yes, not nearly as clean. However, I (we) would still appreciate the moreelegant solution I described above.>John.>>>[MATH DATE]{03/31/1998}+{01/00/0000}[/MATH]>>returns>>05/01/1998>>>>While I understand that May 1st is being interpreted as April 31st, I>>consider this a bug. Adding 1 month to the last day of the month should>>give the last day of the next month.>>>>Michael>>>>Michael Winston *By Phone!: (503)/652/8815 x341>> John A. Hill, V.P. MarketingThanks,Dale ________________________ ___________________________| Dale LaFountain | mailto:dalel@dhorse.com || MIS Director,WebMaster | http://www.dhorse.com/ || Dark Horse Comics, Inc.| Phone: 503-652-8815 x324 |\________________________|___________________________/
Dale LaFountain
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Permissions (2000)
Need WebDNA that crashes server for testing (2000)
emailer w/F2 (1997)
Summing fields (1997)
Limit on nested [ShowIf]'s? (1997)
PSC recommends what date format yr 2000??? (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Nested tags count question (1997)
WebCatalog not running after upgrade (2000)
Upgrading (2003)
$adminput doesn't allow [include] files (1997)
PIXO with cometsite ... and/or other plugins (1998)
storeBuilder (2002)
WebCommerce: Folder organization ? (1997)
Hiding HTML and breaking the page (1997)
Signal Raised Error (1997)
WC2b15 File Corruption (1997)
Hiding HTML and page breaks (1997)
Character limit in [Search]? (1998)
Multiple catalog databases and showcart (1997)