Re: [WebDNA] Feature requests - date format

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 104270
interpreted = N
texte =
Hi Dan,=A0
Simply wrapp= ing a variable in [math] tags will integer-ize it.

Terry


On Mon, 28 Dec 2009 07:27:36 -0800
Dan Strong <webdna@danstrong.com> wrote:> That it is, that it is... also, I mistyped and said I
>multiply by 0... I actually multiply by 1. Bu= t I'm sure
>you all know what I meant because you probably do the
>same thing.
>
> --
&= gt; -Dan Strong
> http://www.DanStrong.com
>
>
> On 12/28/2009 7:22 AM,= Matthew Bohne wrote:
>> %j is already taken (Day of the year 001-365).
>>
>> Why not %D? It i= s case sensitive.
>>
>>
>>
>> Dan Strong wrote:
>>> Not that it specifically solves this, b= ut just to add...
>>>I multiply
>>> my [date]s by 0 to cleanse them of leading zeroes. I >>>also have/had
>>> clients that fixate(d) on this. Agreed that a built-in
>>> "= non-leading-zero" specifier (%j works for me) would be
>>>nice.
>>> -Dan
>>>
&g= t;>>
>>> On 12/26/2009 5:45 PM, Terry Wilson wrote:
>>>> Nice workaround, Chris!
&g= t;>>>
>>>>
>>>> On Sat, 26 Dec 2009 23:21:07 -0200
>>>> christophe.billiot= tet@webdna.us wrote:
>>>> > what about
>>>> >
>>>> > [grep search= =3D 0&replace=3D ]
>>>> > [Format Days_To_Date %A, %B %d,
>>>> >%Y][math]{[eventd= ate]}[/math][/Format]
>>>> > [/grep]
>>>> >
>>>> > - chris
>= >>> >
>>>> > On Dec 26, 2009, at 23:02, Terry Wilson wrote:
>>>> >
&= gt;>>> >> You guys are missing the point. I'm talking about
>>>> >>formatting a dat= e field such as
>>>> >>
>>>> >> [Format Days_To_Date %A, %B %d,
= >>>> >>%Y][math]{[eventdate]}[/math][/Format]
>&g= t;>> >>
>>>> >> Currently, something like the above= looks like
>>>> >>
>>>> >> Friday, January 01, 2010 -- ugly! S= o I have to do
>>>>this
>>>> >>to get January 1, 2010
>>>> >>
>>&g= t;> >> [format days_to_date
>>>> >>%A][math]{[eventdate]}[/math][/f= ormat], [format
>>>> >>days_to_date %b][math]{[eventdate]}[/math][/format]
>>&g= t;> >>[math][format days_to_date
>>>> >>%d][math]{[eventdate]}[/math][/f= ormat][/math], [format
>>>> >>days_to_date %Y][math]{[eventdate]}[/math][/format]
>>&g= t;> >>
>>>> >> (It performs math on the day portion to turn it into
>>>>= an
>>>> >>integer.)
>>>> >>
>>>> >&g= t; I display dates all the time on web pages, and it
>>>>just
>>>> >>looks awful t= o show a leading zero in a written out
>>>>date.
>>>> >>Customers also comp= lain about it, they really do.
>>>> >>
>>>> >> This what i= s currently available:
>>>> >>
>>>> >> %a....: Abbreviated weekday name "W= ed"
>>>> >> %A....: Full weekday name "Wednesday"
>>>> >> %b....: Abbreviated= month name "Feb"
>>>> >> %B....: Full month name "February"
>>>> >> %c....: D= ate 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
>>>&= gt; >> %M....: Minute 00-59
>>>> >> %p....: AM or PM
>>>> &= gt;> %S....: Seconds 00-59
>>>> >> %U....: Week # of year, Sunday first d= ay of week
>>>> >> %w....: Weekday 0 (Sunday) - 6 (Saturday)
>>>> >> %W....: We= ek # 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<= br>>>>> >> %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
>>>> &g= t;>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 W= ebDNA up to parity with php.
>>>> >>
>>>> >> Terry
&= gt;>>> >>
>>>> >>> Better yet, write a function and call it date. That
>&= gt;>> >>>will overwrite
>>>> >>> the native method within pages= using that function.
>>>> >>> Plus there's one
>>>> >>> less keywo= rd to remember.
>>>> >>>
>>>> >>> Bill
>>>> &g= t;>>
>>>> >>> On Thu, Dec 24, 2009 at 1:14 PM, Donovan Brooke
>>>> >>= ><dbrooke@webdna.us> wrote:
>>>> >>>> Terry Wilson wrote:
>&g= t;>> >>>>>
>>>> >>>>> How about a date format that does not have the
&= gt;>>>leading
>>>> >>>>>zero? i.e., like d,
>>>> >>>&= gt;> but without the zeroes, like the j in php.
>>>>Currently I
>>>> >>>>= >jump through hoops
>>>> >>>>> splitting the date up and using [math] to make
&= gt;>>>this
>>>> >>>>>happen.
>>>> >>>>>
&= gt;>>> >>>>> Terry
>>>> >>>>
>>>> >>&g= t;>
>>>> >>>> you could write a function, then call that..
>>>> >>>= >
>>>> >>>> [cleandate [date]]
>>>> >>>>
>>>&g= t; >>>> Donovan
>>>> >>>>
>>>> >>>>
>>>>= >>>>
>>>> >>>> --
>>>> >>>> Donovan Brooke>>>> >>>> WebDNA Software Corporation
>>>> >>>> http://www.webd= na.us
>>>> >>>> **[Square Bracket Utopia]**
>>>> >>>>
>= >>>---------------------------------------------------------
= >>>> >>>> This message is sent to you because you are
>>= >>subscribed
>>>> >>>>to
>>>> >>>> the mailing list = <talk@webdna.us>.
>>>> >>>> To unsubscribe, E-mail to: <talk-leave@webdna.us><= br>>>>> >>>> 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=3Dtopics&cate= gory=3D288
>>>> >>>>
>>>> >>>
>>>>---= ------------------------------------------------------
>>>>= ; >>> This message is sent to you because you are
>>>= >subscribed
>>>> >>>to
>>>> >>> the mailing list <talk= @webdna.us>.
>>>> >>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
&= gt;>>> >>> 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=3Dtopics&category=3D288
>>>>= ; >>
>>>> >> --
>>>> >> Ter= ry Wilson | terry@terryfic.com |
>>>>http://terryfic.com
>>>> >> http= ://WhosComing.com - a simplified, affordable
>>>>online
>>>> >>reservation system=
>>>> >> http://TightJacket.com -- stylish protection for your
>>>>= >>laptop
>>>> >>
>>>> ----------------------------------------------------= ----------------------
>>>>
>>>> >> Attitude is the only di= fference between ordeal and
>>>> >>adventure.
>>>> >>
>>>>-----= ----------------------------------------------------
>>>> >> This message is sent to you because you are
>>>>= subscribed
>>>> >>to
>>>> >> the mailing list <talk@webdna.= us>.
>>>> >> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>>> = >> archives: http://mail.webdna.us/list/talk@webdna.us
>>>> >> ol= d archives: http://dev.webdna.us/TalkListArchive/
>>>> >> Bug Reporting:
>>>> >>http://forum.webdna.u= s/eucabb.html?page=3Dtopics&category=3D288
>>>> >
>>>> >
>>>>-----------------------= ----------------------------------
>>>> > This message is sent to you because you are subscribed
>>&g= t;> >to
>>>> > the mailing list <talk@webdna.us>.
>>>> > To unsubscr= ibe, E-mail to: <talk-leave@webdna.us>
>>>> > archives: http://mail.webdna.us/list/talk@webdna.us
>>>&= gt; > old archives: http://dev.webdna.us/TalkListArchive/
>>>> > Bug Report= ing:
>>>> >http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288>>>>
>>>>
>>>
>>>>>> --
>>> -Dan Strong
>>> http://www.DanStrong.com<= br>>>
>> ---------------------------------------------------------
>> Thi= s message is sent to you because you are subscribed
>>to
>> the mailing list <talk@webdna.us= >.
>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>> 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=3Dtopics&category=3D288<= br>>
>
> -------------------------------------------------------= --
> This message is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us= >.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> 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=3Dtopics&category=3D288

=A0=
Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Feature requests - date format (Dan Strong 2009)
  2. Re: [WebDNA] Feature requests - date format ("Terry Wilson" 2009)
  3. Re: [WebDNA] Feature requests - date format ("Terry Wilson" 2009)
  4. Re: [WebDNA] Feature requests - date format (Dan Strong 2009)
  5. Re: [WebDNA] Feature requests - date format (Matthew Bohne 2009)
  6. Re: [WebDNA] Feature requests - date format (Dan Strong 2009)
  7. Re: [WebDNA] Feature requests - date format ("Terry Wilson" 2009)
  8. Re: [WebDNA] Feature requests - date format (christophe.billiottet@webdna.us 2009)
  9. Re: [WebDNA] Feature requests - date format (Terry Wilson 2009)
  10. Re: [WebDNA] Feature requests - date format (William DeVaul 2009)
  11. Re: [WebDNA] Feature requests - date format (Donovan Brooke 2009)
  12. [WebDNA] Feature requests - date format (Terry Wilson 2009)
Hi Dan,=A0
Simply wrapp= ing a variable in [math] tags will integer-ize it.

Terry


On Mon, 28 Dec 2009 07:27:36 -0800
Dan Strong <webdna@danstrong.com> wrote:> That it is, that it is... also, I mistyped and said I
>multiply by 0... I actually multiply by 1. Bu= t I'm sure
>you all know what I meant because you probably do the
>same thing.
>
> --
&= gt; -Dan Strong
> http://www.DanStrong.com
>
>
> On 12/28/2009 7:22 AM,= Matthew Bohne wrote:
>> %j is already taken (Day of the year 001-365).
>>
>> Why not %D? It i= s case sensitive.
>>
>>
>>
>> Dan Strong wrote:
>>> Not that it specifically solves this, b= ut just to add...
>>>I multiply
>>> my [date]s by 0 to cleanse them of leading zeroes. I >>>also have/had
>>> clients that fixate(d) on this. Agreed that a built-in
>>> "= non-leading-zero" specifier (%j works for me) would be
>>>nice.
>>> -Dan
>>>
&g= t;>>
>>> On 12/26/2009 5:45 PM, Terry Wilson wrote:
>>>> Nice workaround, Chris!
&g= t;>>>
>>>>
>>>> On Sat, 26 Dec 2009 23:21:07 -0200
>>>> christophe.billiot= tet@webdna.us wrote:
>>>> > what about
>>>> >
>>>> > [grep search= =3D 0&replace=3D ]
>>>> > [Format Days_To_Date %A, %B %d,
>>>> >%Y][math]{[eventd= ate]}[/math][/Format]
>>>> > [/grep]
>>>> >
>>>> > - chris
>= >>> >
>>>> > On Dec 26, 2009, at 23:02, Terry Wilson wrote:
>>>> >
&= gt;>>> >> You guys are missing the point. I'm talking about
>>>> >>formatting a dat= e field such as
>>>> >>
>>>> >> [Format Days_To_Date %A, %B %d,
= >>>> >>%Y][math]{[eventdate]}[/math][/Format]
>&g= t;>> >>
>>>> >> Currently, something like the above= looks like
>>>> >>
>>>> >> Friday, January 01, 2010 -- ugly! S= o I have to do
>>>>this
>>>> >>to get January 1, 2010
>>>> >>
>>&g= t;> >> [format days_to_date
>>>> >>%A][math]{[eventdate]}[/math][/f= ormat], [format
>>>> >>days_to_date %b][math]{[eventdate]}[/math][/format]
>>&g= t;> >>[math][format days_to_date
>>>> >>%d][math]{[eventdate]}[/math][/f= ormat][/math], [format
>>>> >>days_to_date %Y][math]{[eventdate]}[/math][/format]
>>&g= t;> >>
>>>> >> (It performs math on the day portion to turn it into
>>>>= an
>>>> >>integer.)
>>>> >>
>>>> >&g= t; I display dates all the time on web pages, and it
>>>>just
>>>> >>looks awful t= o show a leading zero in a written out
>>>>date.
>>>> >>Customers also comp= lain about it, they really do.
>>>> >>
>>>> >> This what i= s currently available:
>>>> >>
>>>> >> %a....: Abbreviated weekday name "W= ed"
>>>> >> %A....: Full weekday name "Wednesday"
>>>> >> %b....: Abbreviated= month name "Feb"
>>>> >> %B....: Full month name "February"
>>>> >> %c....: D= ate 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
>>>&= gt; >> %M....: Minute 00-59
>>>> >> %p....: AM or PM
>>>> &= gt;> %S....: Seconds 00-59
>>>> >> %U....: Week # of year, Sunday first d= ay of week
>>>> >> %w....: Weekday 0 (Sunday) - 6 (Saturday)
>>>> >> %W....: We= ek # 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<= br>>>>> >> %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
>>>> &g= t;>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 W= ebDNA up to parity with php.
>>>> >>
>>>> >> Terry
&= gt;>>> >>
>>>> >>> Better yet, write a function and call it date. That
>&= gt;>> >>>will overwrite
>>>> >>> the native method within pages= using that function.
>>>> >>> Plus there's one
>>>> >>> less keywo= rd to remember.
>>>> >>>
>>>> >>> Bill
>>>> &g= t;>>
>>>> >>> On Thu, Dec 24, 2009 at 1:14 PM, Donovan Brooke
>>>> >>= ><dbrooke@webdna.us> wrote:
>>>> >>>> Terry Wilson wrote:
>&g= t;>> >>>>>
>>>> >>>>> How about a date format that does not have the
&= gt;>>>leading
>>>> >>>>>zero? i.e., like d,
>>>> >>>&= gt;> but without the zeroes, like the j in php.
>>>>Currently I
>>>> >>>>= >jump through hoops
>>>> >>>>> splitting the date up and using [math] to make
&= gt;>>>this
>>>> >>>>>happen.
>>>> >>>>>
&= gt;>>> >>>>> Terry
>>>> >>>>
>>>> >>&g= t;>
>>>> >>>> you could write a function, then call that..
>>>> >>>= >
>>>> >>>> [cleandate [date]]
>>>> >>>>
>>>&g= t; >>>> Donovan
>>>> >>>>
>>>> >>>>
>>>>= >>>>
>>>> >>>> --
>>>> >>>> Donovan Brooke>>>> >>>> WebDNA Software Corporation
>>>> >>>> http://www.webd= na.us
>>>> >>>> **[Square Bracket Utopia]**
>>>> >>>>
>= >>>---------------------------------------------------------
= >>>> >>>> This message is sent to you because you are
>>= >>subscribed
>>>> >>>>to
>>>> >>>> the mailing list = <talk@webdna.us>.
>>>> >>>> To unsubscribe, E-mail to: <talk-leave@webdna.us><= br>>>>> >>>> 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=3Dtopics&cate= gory=3D288
>>>> >>>>
>>>> >>>
>>>>---= ------------------------------------------------------
>>>>= ; >>> This message is sent to you because you are
>>>= >subscribed
>>>> >>>to
>>>> >>> the mailing list <talk= @webdna.us>.
>>>> >>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
&= gt;>>> >>> 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=3Dtopics&category=3D288
>>>>= ; >>
>>>> >> --
>>>> >> Ter= ry Wilson | terry@terryfic.com |
>>>>http://terryfic.com
>>>> >> http= ://WhosComing.com - a simplified, affordable
>>>>online
>>>> >>reservation system=
>>>> >> http://TightJacket.com -- stylish protection for your
>>>>= >>laptop
>>>> >>
>>>> ----------------------------------------------------= ----------------------
>>>>
>>>> >> Attitude is the only di= fference between ordeal and
>>>> >>adventure.
>>>> >>
>>>>-----= ----------------------------------------------------
>>>> >> This message is sent to you because you are
>>>>= subscribed
>>>> >>to
>>>> >> the mailing list <talk@webdna.= us>.
>>>> >> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>>> = >> archives: http://mail.webdna.us/list/talk@webdna.us
>>>> >> ol= d archives: http://dev.webdna.us/TalkListArchive/
>>>> >> Bug Reporting:
>>>> >>http://forum.webdna.u= s/eucabb.html?page=3Dtopics&category=3D288
>>>> >
>>>> >
>>>>-----------------------= ----------------------------------
>>>> > This message is sent to you because you are subscribed
>>&g= t;> >to
>>>> > the mailing list <talk@webdna.us>.
>>>> > To unsubscr= ibe, E-mail to: <talk-leave@webdna.us>
>>>> > archives: http://mail.webdna.us/list/talk@webdna.us
>>>&= gt; > old archives: http://dev.webdna.us/TalkListArchive/
>>>> > Bug Report= ing:
>>>> >http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288>>>>
>>>>
>>>
>>>>>> --
>>> -Dan Strong
>>> http://www.DanStrong.com<= br>>>
>> ---------------------------------------------------------
>> Thi= s message is sent to you because you are subscribed
>>to
>> the mailing list <talk@webdna.us= >.
>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>> 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=3Dtopics&category=3D288<= br>>
>
> -------------------------------------------------------= --
> This message is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us= >.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> 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=3Dtopics&category=3D288

=A0=
"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:

two unique banners on one page (1997) OT: Google image search results (2004) Requiring that certain fields be completed (1997) Configuration Q (1998) NT 4.0/IIS WebCat Installation (1998) [WebDNA] MVC for WebDNA (2015) FEA REQ: One .hdr, multiple .db's (2003) Discount solution? (1998) [WebDNA] Cannot read LongText data type from MySQL (2011) webDNA and ASP pages (1997) Wierd thing in ViewOrder.tpl (1999) question: search return in order (1997) problems with 2 tags shakur (1997) NumFound (1999) WebCatalog2 Feature Feedback (1996) [WebDNA] Emailer breaking format (2015) Help with number searching (1999) Help name our technology! (1997) Calendar Solutions (1998) Mac: [ListFiles] bug alert (1997)