Re: Date Math bug

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16856
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.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.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 >Internet Coordinator *By e-mail!: michaelw@dhorse.com >Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ John A. Hill, V.P. Marketing Pacific Coast Software eCommerce / Web Developer Tools http://www.smithmicro.com 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.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.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 >Internet Coordinator *By e-mail!: michaelw@dhorse.com >Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ John A. Hill, V.P. Marketing Pacific Coast Software eCommerce / Web Developer Tools http://www.smithmicro.com John Hill

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:

more on prefs not being written (2000) emailer error -108 (1997) For those of you not on the WebCatalog Beta... (1997) Re:listfiles-looking for slick solution (1997) X etc.... (1999) [referrer] tag (1997) NT or Mac (1997) searching by date (1998) [TaxableTotal] - not working with AOL and IE (1997) WebCatalog NT beta 18 problem (1997) final on include (1997) Initiating NewCart (1997) HTTP header line is too long? (1997) Re:Need help... (1997) serial number generation (1997) WebCatalog and WebMerchant reviewed by InfoWorld (1997) [Lookup] improvment [feature request] (2004) Apoligy (1997) & Aftermath (2000) Pre-parse hell (2008)