Re: Adding a month and the 31st (bug?)
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 42057
interpreted = N
texte = Thank you very very much. This has started out being an odd morning.On Wednesday, July 31, 2002 10:27 AM, John Peacock
wrote:>Matthew Bohne wrote:>> Slight problem. Here's the code:>> >> [format days_to_date %m/%Y][math]{[date]}+{00/00/0000}[/math][/format]>> [format days_to_date %m/%Y][math]{[date]}+{01/00/0000}[/math][/format]>> >>Actually, this has little to do with the current day being the 31st; you would >also have problems with February for January 29, 30, 31. The issue is you are >incrementing the month number for the current date, but the following month >doesn't have that many days, so the [format days_to_date] moves it into the >following month. In other words:>> 07/31/2002 + 01/00/00 = 08/31/2002 => 09/01/2002>>Do somthing like this instead (not inside an [orderfile]>context):>> [math date]thismonth=[format days_to_date %m/01/%Y]{[date]}[/math]> [format days_to_date %m/%Y][math]{[thismonth]}+{00/00/0000}[/math][/format]> [format days_to_date>%m/%Y][math]{[thismonth]}+{01/00/0000}[/math][/format]>>so that [thismonth] will always be the first day of the current>month.>>HTH>>John>>-- >John Peacock>Director of Information Research and Technology>Rowman & Littlefield Publishing Group>4720 Boston Way>Lanham, MD 20706>301-459-3366 x.5010>fax 301-429-5747>>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Thank you very very much. This has started out being an odd morning.On Wednesday, July 31, 2002 10:27 AM, John Peacock wrote:>Matthew Bohne wrote:>> Slight problem. Here's the code:>> >> [format days_to_date %m/%Y][math]{[date]}+{00/00/0000}[/math][/format]>> [format days_to_date %m/%Y][math]{[date]}+{01/00/0000}[/math][/format]>> >>Actually, this has little to do with the current day being the 31st; you would >also have problems with February for January 29, 30, 31. The issue is you are >incrementing the month number for the current date, but the following month >doesn't have that many days, so the [format days_to_date] moves it into the >following month. In other words:>> 07/31/2002 + 01/00/00 = 08/31/2002 => 09/01/2002>>Do somthing like this instead (not inside an [orderfile]>context):>> [math date]thismonth=[format days_to_date %m/01/%Y]{[date]}[/math]> [format days_to_date %m/%Y][math]{[thismonth]}+{00/00/0000}[/math][/format]> [format days_to_date>%m/%Y][math]{[thismonth]}+{01/00/0000}[/math][/format]>>so that [thismonth] will always be the first day of the current>month.>>HTH>>John>>-- >John Peacock>Director of Information Research and Technology>Rowman & Littlefield Publishing Group>4720 Boston Way>Lanham, MD 20706>301-459-3366 x.5010>fax 301-429-5747>>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Matthew Bohne
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:
Whats wrong with this???? (2001)
Shopping cart problem (2003)
Can't load tmpl files (1997)
Two submit buttons ? (1997)
[WebDNA] Encrypt / Decrypt weirdness..... plus some date weirdness (2015)
PSC recommends what date format yr 2000??? (1997)
Error:Too many nested [xxx] contexts (1997)
select multiple 2 more cents (1997)
Logging purchases (1997)
WebCatalog Hosting (1996)
Wrapping text (1998)
Formula Question (1998)
[WebDNA] DNA hosting and/or Image server Hosting. (2011)
Last Day of the Month (2005)
OS X (2000)
Using WC for Bulk Emailings (1997)
PIXO with cometsite ... and/or other plugins (1998)
RE: Include (1998)
Null Chars (1999)
WebCatalog/Mac 2.1b2 New Features (1997)