Re: [WebDNA] Feature requests - date format
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 104260
interpreted = N
texte = You guys are missing the point. I'm talking about formatting a date field such as[Format Days_To_Date %A, %B %d, %Y][math]{[eventdate]}[/math][/Format]Currently, something like the above looks likeFriday, January 01, 2010 -- ugly! So I have to do this to get January 1, 2010[format days_to_date %A][math]{[eventdate]}[/math][/format], [format days_to_date %b][math]{[eventdate]}[/math][/format] [math][format days_to_date %d][math]{[eventdate]}[/math][/format][/math], [format days_to_date %Y][math]{[eventdate]}[/math][/format](It performs math on the day portion to turn it into an integer.)I display dates all the time on web pages, and it just looks awful to show a leading zero in a written out date. Customers also complain about it, they really do.This what is currently available:%a....: Abbreviated weekday name "Wed"%A....: Full weekday name "Wednesday"%b....: Abbreviated month name "Feb"%B....: Full month name "February"%c....: Date and time "Wed Sep 19 18:24:21 2010"%d....: Day of month 01-31%H....: Hour 00-23%I....: Hour 01-12%j....: Day of year 001-365%m....: Month 01-12%M....: Minute 00-59%p....: AM or PM%S....: Seconds 00-59%U....: Week # of year, Sunday first day of week%w....: Weekday 0 (Sunday) - 6 (Saturday)%W....: Week # of year, Monday first day of week%x....: Date as Sep 11 2008%X....: Time as 14:01:12%y....: Year without century 00-99%Y....: Year with century 1900-2199%z....: offset of server%Z....: Time zone of server%%....: %I propose adding %j for day of month without leading 0. PHP also has one for the month without the leading zero and a bunch of other formats, like the number of days in a month. It would great to add all these formats present in php to bring WebDNA up to parity with php.Terry>Better yet, write a function and call it date. That will overwrite>the native method within pages using that function. Plus there's one>less keyword to remember.>>Bill>>On Thu, Dec 24, 2009 at 1:14 PM, Donovan Brooke
wrote:>> Terry Wilson wrote:>>>>>> How about a date format that does not have the leading zero? i.e., like d,>>> but without the zeroes, like the j in php. Currently I jump through hoops>>> splitting the date up and using [math] to make this happen.>>>>>> Terry>>>>>> you could write a function, then call that..>>>> [cleandate [date]]>>>> Donovan>>>>>>>> -->> Donovan Brooke>> WebDNA Software Corporation>> http://www.webdna.us>> **[Square Bracket Utopia]**>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> old archives: http://dev.webdna.us/TalkListArchive/>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288>>>--------------------------------------------------------->This message is sent to you because you are subscribed to>the mailing list .>To unsubscribe, E-mail to: >archives: http://mail.webdna.us/list/talk@webdna.us>old archives: http://dev.webdna.us/TalkListArchive/>Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemhttp://TightJacket.com -- stylish protection for your laptop--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Associated Messages, from the most recent to the oldest:
You guys are missing the point. I'm talking about formatting a date field such as[Format Days_To_Date %A, %B %d, %Y][math]{[eventdate]}[/math][/Format]Currently, something like the above looks likeFriday, January 01, 2010 -- ugly! So I have to do this to get January 1, 2010[format days_to_date %A][math]{[eventdate]}[/math][/format], [format days_to_date %b][math]{[eventdate]}[/math][/format] [math][format days_to_date %d][math]{[eventdate]}[/math][/format][/math], [format days_to_date %Y][math]{[eventdate]}[/math][/format](It performs math on the day portion to turn it into an integer.)I display dates all the time on web pages, and it just looks awful to show a leading zero in a written out date. Customers also complain about it, they really do.This what is currently available:%a....: Abbreviated weekday name "Wed"%A....: Full weekday name "Wednesday"%b....: Abbreviated month name "Feb"%B....: Full month name "February"%c....: Date and time "Wed Sep 19 18:24:21 2010"%d....: Day of month 01-31%H....: Hour 00-23%I....: Hour 01-12%j....: Day of year 001-365%m....: Month 01-12%M....: Minute 00-59%p....: AM or PM%S....: Seconds 00-59%U....: Week # of year, Sunday first day of week%w....: Weekday 0 (Sunday) - 6 (Saturday)%W....: Week # of year, Monday first day of week%x....: Date as Sep 11 2008%X....: Time as 14:01:12%y....: Year without century 00-99%Y....: Year with century 1900-2199%z....: offset of server%Z....: Time zone of server%%....: %I propose adding %j for day of month without leading 0. PHP also has one for the month without the leading zero and a bunch of other formats, like the number of days in a month. It would great to add all these formats present in php to bring WebDNA up to parity with php.Terry>Better yet, write a function and call it date. That will overwrite>the native method within pages using that function. Plus there's one>less keyword to remember.>>Bill>>On Thu, Dec 24, 2009 at 1:14 PM, Donovan Brooke wrote:>> Terry Wilson wrote:>>>>>> How about a date format that does not have the leading zero? i.e., like d,>>> but without the zeroes, like the j in php. Currently I jump through hoops>>> splitting the date up and using [math] to make this happen.>>>>>> Terry>>>>>> you could write a function, then call that..>>>> [cleandate [date]]>>>> Donovan>>>>>>>> -->> Donovan Brooke>> WebDNA Software Corporation>> http://www.webdna.us>> **[Square Bracket Utopia]**>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> old archives: http://dev.webdna.us/TalkListArchive/>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288>>>--------------------------------------------------------->This message is sent to you because you are subscribed to>the mailing list .>To unsubscribe, E-mail to: >archives: http://mail.webdna.us/list/talk@webdna.us>old archives: http://dev.webdna.us/TalkListArchive/>Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemhttp://TightJacket.com -- stylish protection for your laptop--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Terry Wilson
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:
Help! WebCat2 bug (1997)
Hard carriage convertion? (1998)
RE: [WebDNA] XML Help (2009)
RE: WebCatalog2 for NT Beta Request (1997)
Error: Can't open order file. Ignoring [OrderFile] context (2000)
Authenticate (1997)
Best way to handle 404 errors with WebDNA and Web* V (2003)
Re:no template caching (1997)
[OT] Communigate List (2003)
CSS positioning!!! (2001)
Email within tmpl ? (1997)
Linux ODBC and the ODBC Bridge (2000)
RE: Help name our technology! (1997)
SOP for WebDNA talk (2004)
ListFiles (1998)
Text data with spaces in them... (1997)
SendMail context not working on CentOS 4 (2007)
Summing fields (1997)
inconsistent webcat calculation? (1997)
WebMerchant 1.6 and SHTML (1997)