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 tryingto decide what the standard behavior should be. Please let us know how youfeel on these various options:Note: Dates are automatically detected in the math context as long as theyare in the following form
//. This means thatdivision of that sort (which I don't thing anyone would ever do) is notpermitted.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 todaysdate you will really be adding 365 days which may not give you todays datea year from now because of leap years. However, it does let you easilysubtract two dates to get the days between them so they can be used for aninput somewhere else. The result of the math will be an integer value thatyou can convert back to a date using the [format] context (with a parameterof days_to_date: [format days_to_date][math]...[/math][/format].2. if any date is detected in the math context, then the entire expressionwill be evaluated and output as a date. That is, you can add 12/8/65+0/0/31and you will get 12/8/96 regardless of leap years. And, the result of themath 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 thenumber of days between them you will need to format the date as days (forexample [format date_to_days][math]...[/math][/format]). Also, any integersin 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 best11770 Bernardo Plaza Ct. #462 * Catalog and Merchant softwareSan Diego, CA 92128 * http://www.smithmicro.comPhone: 619-675-1106 Fax: 675-0372 *********************************------------------------------------To leave this talk list send an email to macjordomo@smithmicro.comwith BODYunsubscribe WebDNA-Talk------------------------------------
Associated Messages, from the most recent to the oldest:
No, not that kind of date...The [math] context now understands how to work with dates and we're tryingto decide what the standard behavior should be. Please let us know how youfeel on these various options:Note: Dates are automatically detected in the math context as long as theyare in the following form //. This means thatdivision of that sort (which I don't thing anyone would ever do) is notpermitted.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 todaysdate you will really be adding 365 days which may not give you todays datea year from now because of leap years. However, it does let you easilysubtract two dates to get the days between them so they can be used for aninput somewhere else. The result of the math will be an integer value thatyou can convert back to a date using the [format] context (with a parameterof days_to_date: [format days_to_date][math]...[/math][/format].2. if any date is detected in the math context, then the entire expressionwill be evaluated and output as a date. That is, you can add 12/8/65+0/0/31and you will get 12/8/96 regardless of leap years. And, the result of themath 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 thenumber of days between them you will need to format the date as days (forexample [format date_to_days][math]...[/math][/format]). Also, any integersin 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 best11770 Bernardo Plaza Ct. #462 * Catalog and Merchant softwareSan Diego, CA 92128 * http://www.smithmicro.comPhone: 619-675-1106 Fax: 675-0372 *********************************------------------------------------To leave this Talk List send an email to macjordomo@smithmicro.comwith BODYunsubscribe 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:
[WebDNA] o search engines index .db files? (2009)
# fields limited? (1997)
Help with Repost Data msg from form (1997)
SV: Strange sort in search... (2000)
Sample Tearoom Search Error (1997)
[FoundItems] solved - thanks (1997)
Re:Searching for ALL / empty form field (1997)
2.0 Info (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
[OT] (waaaay OT) further off topic than before (2004)
Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997)
webcat feature request (1997)
Running 2 two WebCatalog.acgi's (1996)
Checking for @ sign (2006)
Custom WebCat Prefs ... (1997)
shipcost (1997)
Probably a very simple question? (1997)
Showing specific [cart] contents (1998)
customizing the color of user's pages (1997)
question: search return in order (1997)