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 be 3/28/1998 in this case. If day x is valid in the target month and, then just change the month as indicated. The tricky part is going from long month to short month. If x=29,30, or 31 and doesn't exist in the target month, then additionally change the day of the month to the last valid value of that month. It seems more consistent than incrementing to the next 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 more elegant 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:

    
  1. Re: Date Math bug (Dale LaFountain 1998)
  2. Re: Date Math bug (John Hill 1998)
  3. Date Math bug (Michael Winston 1998)
  4. Re: Webcat 2.0.1 date math bug -> Crash! (wahl@dnai.com (Bernt Wahl) 1997)
  5. Re: Webcat 2.0.1 date math bug -> Crash! (Kenneth Grome 1997)
  6. Webcat 2.0.1 date math bug -> Crash! (Dale LaFountain 1997)
>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 be 3/28/1998 in this case. If day x is valid in the target month and, then just change the month as indicated. The tricky part is going from long month to short month. If x=29,30, or 31 and doesn't exist in the target month, then additionally change the day of the month to the last valid value of that month. It seems more consistent than incrementing to the next 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 more elegant 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:

NewCart+Search with one click ? (1997) Size limit for tmpl editor ? (1997) HELP WITH DATES (1997) [WebDNA] search by range of dates (2009) emailer settings and control questions (1997) RE: Problems reading files created by WC (1997) search form problem.. (1997) grouped fields? (1999) Plugin or CGI or both (1997) Preventing Safari caching (2003) WebCatalog for Postcards ? (1997) Revisit: speed test (2002) SiteGuard Admin Feature ? (1997) quantity minimum problem (1997) Color options - modified (1999) Format question WC Mac f3 (1997) Great product and great job ! (1997) Carat character in path (2001) listfiles with large volume of files (2004) Size images (2002)