HELP WITH DATES

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10453
interpreted = N
texte = No, not that kind of date...The [math] context now understands how to work with dates and we're trying to decide what the standard behavior should be. Please let us know how you feel on these various options:Note: Dates are automatically detected in the math context as long as they are in the following form //. This means that division of that sort (which I don't thing anyone would ever do) is not permitted.1. dates are automatically converted to an integer value (days since 1/1/0) and then added, subtracted, etc. This means that if you add 0/0/1 to todays date you will really be adding 365 days which may not give you todays date a year from now because of leap years. However, it does let you easily subtract two dates to get the days between them so they can be used for an input somewhere else. The result of the math will be an integer value that you can convert back to a date using the [format] context (with a parameter of days_to_date: [format days_to_date][math]...[/math][/format].2. if any date is detected in the math context, then the entire expression will be evaluated and output as a date. That is, you can add 12/8/65+0/0/31 and you will get 12/8/96 regardless of leap years. And, the result of the math expression will be 12/8/96 so there is no need to wrap the [format] context around it. However, if you want to subtract two dates to get the number of days between them you will need to format the date as days (for example [format date_to_days][math]...[/math][/format]). Also, any integers in the expression will be assumed to be days and handled appropriately.John A. Hill, V.P. Marketing ********************************* Pacific Coast Software * Home of the Web's best 11770 Bernardo Plaza Ct. #462 * Catalog and Merchant software San Diego, CA 92128 * http://www.smithmicro.com Phone: 619-675-1106 Fax: 675-0372 ********************************* ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: Help with dates (John Peacock 2001)
  2. Re: Help with dates (Gorana Leahy 2001)
  3. Re: Help with dates (Gorana Leahy 2001)
  4. Re: Help with dates (John Peacock 2001)
  5. Re: Help with dates (Will Starck 2001)
  6. Re: Help with dates (John Peacock 2001)
  7. Re: Help with dates (Tom Duke 2001)
  8. Re: Help with dates (Tom Duke 2001)
  9. Re: Help with dates (Gorana Leahy 2001)
  10. Re: Help with dates (John Peacock 2001)
  11. Help with dates (Gorana Leahy 2001)
  12. Re: HELP WITH DATES (Kenneth Grome 1997)
  13. Re: HELP WITH DATES (Jim Shaughnessy 1997)
  14. Re: HELP WITH DATES (John Hill 1997)
  15. Re: HELP WITH DATES (grichter@panavise.com (Gary Richter) 1997)
  16. Re: HELP WITH DATES (Jim Shaughnessy 1997)
  17. Re: HELP WITH DATES (Grant Hulbert 1997)
  18. Re: HELP WITH DATES (Kenneth Grome 1997)
  19. HELP WITH DATES (John Hill 1997)
No, not that kind of date...The [math] context now understands how to work with dates and we're trying to decide what the standard behavior should be. Please let us know how you feel on these various options:Note: Dates are automatically detected in the math context as long as they are in the following form //. This means that division of that sort (which I don't thing anyone would ever do) is not permitted.1. dates are automatically converted to an integer value (days since 1/1/0) and then added, subtracted, etc. This means that if you add 0/0/1 to todays date you will really be adding 365 days which may not give you todays date a year from now because of leap years. However, it does let you easily subtract two dates to get the days between them so they can be used for an input somewhere else. The result of the math will be an integer value that you can convert back to a date using the [format] context (with a parameter of days_to_date: [format days_to_date][math]...[/math][/format].2. if any date is detected in the math context, then the entire expression will be evaluated and output as a date. That is, you can add 12/8/65+0/0/31 and you will get 12/8/96 regardless of leap years. And, the result of the math expression will be 12/8/96 so there is no need to wrap the [format] context around it. However, if you want to subtract two dates to get the number of days between them you will need to format the date as days (for example [format date_to_days][math]...[/math][/format]). Also, any integers in the expression will be assumed to be days and handled appropriately.John A. Hill, V.P. Marketing ********************************* Pacific Coast Software * Home of the Web's best 11770 Bernardo Plaza Ct. #462 * Catalog and Merchant software San Diego, CA 92128 * http://www.smithmicro.com Phone: 619-675-1106 Fax: 675-0372 ********************************* ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ 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:

OS and/or browser problems? (2002) Multiple catalog databases and showcart (1997) Limiting user access to .tmpl files (1997) fixed date problem (1997) [Way OT] Workstation Security (2002) passing a webdna variable into javascript/cgi (2002) [searchString] (1997) help! problem using [referrer] still in 2.01 (1997) Loosing Quantity (2000) [date format] w/in sendmail (1997) Mac -Shareware Listserver (1998) [OT] Happy Turkey Day! (2003) DreamWeaver Plug-in (2000) [WebDNA] Installation for Linux Dummy.. (2013) [OT] Domain Management (2003) Unit Cost Look Up (2001) catagories (1997) security (1997) Why does lineitems loop in sendmail = crash ? (2000) Credit card processing - UK (1997)