Re: [date] problem with %d%m%Y

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18298
interpreted = N
texte = I just realized that your ReadDateFormat should be set to dmy for this to work properly. My guess is that this isn't set for some reason. If this is the case, contact me privately if you have any questions.John.>I have noticed a bug in the [date] tag when performing math calculation >on a date when the date prefs is non standard. > >If the date preference is set to default : %m%d%Y (such as 12/25/1997) > [math date]{[date]}+90[/math] adds 90 days to the current date > >If the date preference is set to : %d%m%Y (such as 25/12/1997) > [math date]{[date]}+90[/math] DOES NOT add 90 days to the current >date > >What should I do ? In France we are used to %d%m%Y and nobody understands >a date when the month is given first (05/06/98 is the 5 june 1998 for us, >not 6 may 1998). > >I have also noticed problems when adding 12 monthes to a date with the >result. >I have included my date-test-code so you can see what happens with the >preferences of Webcatalog set to %m%d%Y or %d%m%Y. The expected result >only happens with %m%d%Y > >Laurent. > >---Sample code follows ----- >date : [date]

>date + 2 monthes : [math date]{[date]}+{00/2/0000}[/math]

>date + 2 days : [math date]{[date]}+{2/00/0000}[/math]

>date + 2 years : [math date]{[date]}+{00/00/0002}[/math]

>


>date + 30 days : [math date]{[date]}+30[/math]

>date + 60 days : [math date]{[date]}+60[/math]

>date + 90 days : [math date]{[date]}+90[/math]

>date + 365 days : [math date]{[date]}+365[/math]

>date + 730 days : [math date]{[date]}+730[/math]

>


>french format :
>date + 3 monthes : [math date]{[date]}+{00/03/0000}[/math]

>date + 6 monthes : [math date]{[date]}+{00/06/0000}[/math]

>date + 12 monthes : [math date]{[date]}+{00/12/0000}[/math]

>--
>US format
>date + 3 monthes : [math date]{[date]}+{03/00/0000}[/math]

>date + 6 monthes : [math date]{[date]}+{06/00/0000}[/math]

>date + 12 monthes : [math date]{[date]}+{12/00/0000}[/math]

> > >--- >Laurent Pladys >LXir > > L a u r e n t P l a d y s >--------------------------------------------- > L X i r >_____________________________________________ > 1 5 5 r u e d e P i c p u s > 7 5 0 1 2 P a r i s > F r a n c e >_____________________________________________ > +33 (0)1 44 68 80 60 (tel) > +33 (0)1 44 68 80 61 (fax) >_____________________________________________ > w w w . L X i r . n e t > l t p l a d y s @ L X i r . n e t 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] problem with %d%m%Y (John Hill 1998)
  2. [date] problem with %d%m%Y (Laurent Pladys 1998)
  3. Re: [date] problem with %d%m%Y (John Hill 1998)
  4. Re: [date] problem with %d%m%Y (John Hill 1998)
I just realized that your ReadDateFormat should be set to dmy for this to work properly. My guess is that this isn't set for some reason. If this is the case, contact me privately if you have any questions.John.>I have noticed a bug in the [date] tag when performing math calculation >on a date when the date prefs is non standard. > >If the date preference is set to default : %m%d%Y (such as 12/25/1997) > [math date]{[date]}+90[/math] adds 90 days to the current date > >If the date preference is set to : %d%m%Y (such as 25/12/1997) > [math date]{[date]}+90[/math] DOES NOT add 90 days to the current >date > >What should I do ? In France we are used to %d%m%Y and nobody understands >a date when the month is given first (05/06/98 is the 5 june 1998 for us, >not 6 may 1998). > >I have also noticed problems when adding 12 monthes to a date with the >result. >I have included my date-test-code so you can see what happens with the >preferences of Webcatalog set to %m%d%Y or %d%m%Y. The expected result >only happens with %m%d%Y > >Laurent. > >---Sample code follows ----- >date : [date]

>date + 2 monthes : [math date]{[date]}+{00/2/0000}[/math]

>date + 2 days : [math date]{[date]}+{2/00/0000}[/math]

>date + 2 years : [math date]{[date]}+{00/00/0002}[/math]

>


>date + 30 days : [math date]{[date]}+30[/math]

>date + 60 days : [math date]{[date]}+60[/math]

>date + 90 days : [math date]{[date]}+90[/math]

>date + 365 days : [math date]{[date]}+365[/math]

>date + 730 days : [math date]{[date]}+730[/math]

>


>french format :
>date + 3 monthes : [math date]{[date]}+{00/03/0000}[/math]

>date + 6 monthes : [math date]{[date]}+{00/06/0000}[/math]

>date + 12 monthes : [math date]{[date]}+{00/12/0000}[/math]

>--
>US format
>date + 3 monthes : [math date]{[date]}+{03/00/0000}[/math]

>date + 6 monthes : [math date]{[date]}+{06/00/0000}[/math]

>date + 12 monthes : [math date]{[date]}+{12/00/0000}[/math]

> > >--- >Laurent Pladys >LXir > > L a u r e n t P l a d y s >--------------------------------------------- > L X i r >_____________________________________________ > 1 5 5 r u e d e P i c p u s > 7 5 0 1 2 P a r i s > F r a n c e >_____________________________________________ > +33 (0)1 44 68 80 60 (tel) > +33 (0)1 44 68 80 61 (fax) >_____________________________________________ > w w w . L X i r . n e t > l t p l a d y s @ L X i r . n e t 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:

RE: Error: template (1997) billing system (2003) WebCat2b15MacPlugin - showing [math] (1997) Summing fields (1997) RAM variables (1997) [format 40s]text[/format] doesn't work (1997) Problems setting MIME Headers (1998) Smith Micro - no competition (2000) limitation found on group searching (1997) Is this possible, WebCat2.0 and checkboxes (1997) using webcat with web* & web*SSL (1998) Shell context. (2002) Firesite and [referrer] atg broke (1997) Mine Headers for E-mail (1998) [SearchString] problem with [search] context (1997) More questions about serial number dishing (1997) Showif, Hideif reverse logic ? (1997) emailer don't work (1998) Exclamation point (1997) Hiding URL ? (1998)