-- -Dan Stronghttp://www.DanStrong.com
HiDan,
Simply wrapping a variable in [math] tags willinteger-izeit.
Terry
On Mon, 28 Dec2009 07:27:36 -0800
Dan Strong <webdna@danstrong.com> wrote:
> That it is, that it is... also, Imistyped and said I
>multiply by 0... I actually multiply by 1. But I'm sure
>you all know what I meantbecause you probably do the
>same thing.
>
> --
> -Dan Strong
>http://www.DanStrong.com
>
>
> On 12/28/2009 7:22 AM, Matthew Bohne wrote:
>> %j is alreadytaken (Day of the year 001-365).
>>
>> Why not %D? It is case sensitive.
>>
>>
>>
>>Dan Strong wrote:
>>> Not that it specifically solves this, but 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
>>>
>>>
>>> On 12/26/2009 5:45PM, Terry Wilson wrote:
>>>> Nice workaround, Chris!
>>>>
>>>>
>>>>On Sat, 26 Dec 2009 23:21:07 -0200
>>>> christophe.billiottet@webdna.us wrote:
>>>> >what about
>>>> >
>>>> > [grep search= 0&replace= ]
>>>> >[Format Days_To_Date %A, %B %d,
>>>> >%Y][math]{[eventdate]}[/math][/Format]
>>>> >[/grep]
>>>> >
>>>> > - chris
>>>> >
>>>> > OnDec 26, 2009, at 23:02, Terry Wilson wrote:
>>>> >
>>>> >> You guys are missingthe 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 like
>>>>>>
>>>> >> Friday, January 01, 2010 -- ugly! So I haveto do
>>>>this
>>>>>>to get January 1, 2010
>>>> >>
>>>> >> [formatdays_to_date
>>>> >>%A][math]{[eventdate]}[/math][/format], [format
>>>>>>days_to_date %b][math]{[eventdate]}[/math][/format]
>>>> >>[math][formatdays_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 awritten out
>>>>date.
>>>> >>Customers also complain about it, they reallydo.
>>>> >>
>>>> >> This what is currently available:
>>>>>>
>>>> >> %a....: Abbreviated weekday name "Wed"
>>>> >> %A....: Fullweekday name "Wednesday"
>>>> >> %b....: Abbreviated month name "Feb"
>>>> >>%B....: Full month name "February"
>>>> >> %c....: Date and time "Wed Sep 19 18:24:212010"
>>>> >> %d....: Day of month 01-31
>>>> >> %H....: Hour00-23
>>>> >> %I....: Hour 01-12
>>>> >> %j....: Day of year001-365
>>>> >> %m....: Month 01-12
>>>> >> %M....: Minute00-59
>>>> >> %p....: AM or PM
>>>> >> %S....: Seconds00-59
>>>> >> %U....: Week # of year, Sunday first day ofweek
>>>> >> %w....:Weekday 0 (Sunday) - 6 (Saturday)
>>>> >> %W....: Week # of year, Monday first day ofweek
>>>> >> %x....: Date as Sep 11 2008
>>>> >> %X....: Time as14:01:12
>>>> >> %y....: Year without century 00-99
>>>> >> %Y....: Year withcentury 1900-2199
>>>> >> %z....: offset of server
>>>> >> %Z....: Time zoneof server
>>>> >> %%....: %
>>>> >>
>>>> >> I proposeadding %j for day of month without leading
>>>>0.
>>>> >>PHP also has one for themonth without the leading
>>>>zero
>>>> >>and a bunch of other formats, like thenumber of days
>>>>in
>>>> >>a month. It would great to add all theseformats
>>>>present
>>>> >>in php to bring WebDNA up to parity withphp.
>>>> >>
>>>> >> Terry
>>>> >>
>>>>>>> Better yet, write a function and call it date. That
>>>> >>>willoverwrite
>>>> >>> the native method within pages using thatfunction.
>>>>>>> Plus there's one
>>>> >>> less keyword to remember.
>>>>>>>
>>>> >>> Bill
>>>> >>>
>>>> >>> OnThu, Dec 24, 2009 at 1:14 PM, Donovan Brooke
>>>> >>><dbrooke@webdna.us>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 thej inphp.
>>>>Currently I
>>>> >>>>>jump through hoops
>>>>>>>>> splitting the date up and using [math] to make
>>>>this
>>>>>>>>>happen.
>>>> >>>>>
>>>> >>>>>Terry
>>>> >>>>
>>>> >>>>
>>>> >>>> youcould write a function, then call that..
>>>> >>>>
>>>> >>>>[cleandate [date]]
>>>> >>>>
>>>> >>>> Donovan
>>>>>>>>
>>>> >>>>
>>>> >>>>
>>>>>>>> --
>>>> >>>> Donovan Brooke
>>>> >>>> WebDNASoftware Corporation
>>>> >>>> http://www.webdna.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>
>>>> >>>> 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 <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=topics&category=288
>>>>>>
>>>> >> --
>>>> >> Terry 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 difference betweenordeal and
>>>>>>adventure.
>>>> >>
>>>>---------------------------------------------------------
>>>>>> This message is sent to you because you are
>>>>subscribed
>>>>>>to
>>>> >> the mailing list <talk@webdna.us>.
>>>> >> Tounsubscribe, 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=topics&category=288
>>>>>
>>>> >
>>>>---------------------------------------------------------
>>>>> This message is sent to you because you are subscribed
>>>> >to
>>>> > themailing 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=topics&category=288
>>>>
>>>>
>>>
>>>
>>>--
>>> -Dan Strong
>>> http://www.DanStrong.com
>>
>>---------------------------------------------------------
>> This message is sent to you because you aresubscribed
>>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=topics&category=288
>
>
> ---------------------------------------------------------
> This message is sent to you becauseyou 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=topics&category=288
|
-- -Dan Stronghttp://www.DanStrong.com
HiDan,
Simply wrapping a variable in [math] tags willinteger-izeit.
Terry
On Mon, 28 Dec2009 07:27:36 -0800
Dan Strong <webdna@danstrong.com> wrote:
> That it is, that it is... also, Imistyped and said I
>multiply by 0... I actually multiply by 1. But I'm sure
>you all know what I meantbecause you probably do the
>same thing.
>
> --
> -Dan Strong
>http://www.DanStrong.com
>
>
> On 12/28/2009 7:22 AM, Matthew Bohne wrote:
>> %j is alreadytaken (Day of the year 001-365).
>>
>> Why not %D? It is case sensitive.
>>
>>
>>
>>Dan Strong wrote:
>>> Not that it specifically solves this, but 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
>>>
>>>
>>> On 12/26/2009 5:45PM, Terry Wilson wrote:
>>>> Nice workaround, Chris!
>>>>
>>>>
>>>>On Sat, 26 Dec 2009 23:21:07 -0200
>>>> christophe.billiottet@webdna.us wrote:
>>>> >what about
>>>> >
>>>> > [grep search= 0&replace= ]
>>>> >[Format Days_To_Date %A, %B %d,
>>>> >%Y][math]{[eventdate]}[/math][/Format]
>>>> >[/grep]
>>>> >
>>>> > - chris
>>>> >
>>>> > OnDec 26, 2009, at 23:02, Terry Wilson wrote:
>>>> >
>>>> >> You guys are missingthe 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 like
>>>>>>
>>>> >> Friday, January 01, 2010 -- ugly! So I haveto do
>>>>this
>>>>>>to get January 1, 2010
>>>> >>
>>>> >> [formatdays_to_date
>>>> >>%A][math]{[eventdate]}[/math][/format], [format
>>>>>>days_to_date %b][math]{[eventdate]}[/math][/format]
>>>> >>[math][formatdays_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 awritten out
>>>>date.
>>>> >>Customers also complain about it, they reallydo.
>>>> >>
>>>> >> This what is currently available:
>>>>>>
>>>> >> %a....: Abbreviated weekday name "Wed"
>>>> >> %A....: Fullweekday name "Wednesday"
>>>> >> %b....: Abbreviated month name "Feb"
>>>> >>%B....: Full month name "February"
>>>> >> %c....: Date and time "Wed Sep 19 18:24:212010"
>>>> >> %d....: Day of month 01-31
>>>> >> %H....: Hour00-23
>>>> >> %I....: Hour 01-12
>>>> >> %j....: Day of year001-365
>>>> >> %m....: Month 01-12
>>>> >> %M....: Minute00-59
>>>> >> %p....: AM or PM
>>>> >> %S....: Seconds00-59
>>>> >> %U....: Week # of year, Sunday first day ofweek
>>>> >> %w....:Weekday 0 (Sunday) - 6 (Saturday)
>>>> >> %W....: Week # of year, Monday first day ofweek
>>>> >> %x....: Date as Sep 11 2008
>>>> >> %X....: Time as14:01:12
>>>> >> %y....: Year without century 00-99
>>>> >> %Y....: Year withcentury 1900-2199
>>>> >> %z....: offset of server
>>>> >> %Z....: Time zoneof server
>>>> >> %%....: %
>>>> >>
>>>> >> I proposeadding %j for day of month without leading
>>>>0.
>>>> >>PHP also has one for themonth without the leading
>>>>zero
>>>> >>and a bunch of other formats, like thenumber of days
>>>>in
>>>> >>a month. It would great to add all theseformats
>>>>present
>>>> >>in php to bring WebDNA up to parity withphp.
>>>> >>
>>>> >> Terry
>>>> >>
>>>>>>> Better yet, write a function and call it date. That
>>>> >>>willoverwrite
>>>> >>> the native method within pages using thatfunction.
>>>>>>> Plus there's one
>>>> >>> less keyword to remember.
>>>>>>>
>>>> >>> Bill
>>>> >>>
>>>> >>> OnThu, Dec 24, 2009 at 1:14 PM, Donovan Brooke
>>>> >>><dbrooke@webdna.us>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 thej inphp.
>>>>Currently I
>>>> >>>>>jump through hoops
>>>>>>>>> splitting the date up and using [math] to make
>>>>this
>>>>>>>>>happen.
>>>> >>>>>
>>>> >>>>>Terry
>>>> >>>>
>>>> >>>>
>>>> >>>> youcould write a function, then call that..
>>>> >>>>
>>>> >>>>[cleandate [date]]
>>>> >>>>
>>>> >>>> Donovan
>>>>>>>>
>>>> >>>>
>>>> >>>>
>>>>>>>> --
>>>> >>>> Donovan Brooke
>>>> >>>> WebDNASoftware Corporation
>>>> >>>> http://www.webdna.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>
>>>> >>>> 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 <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=topics&category=288
>>>>>>
>>>> >> --
>>>> >> Terry 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 difference betweenordeal and
>>>>>>adventure.
>>>> >>
>>>>---------------------------------------------------------
>>>>>> This message is sent to you because you are
>>>>subscribed
>>>>>>to
>>>> >> the mailing list <talk@webdna.us>.
>>>> >> Tounsubscribe, 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=topics&category=288
>>>>>
>>>> >
>>>>---------------------------------------------------------
>>>>> This message is sent to you because you are subscribed
>>>> >to
>>>> > themailing 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=topics&category=288
>>>>
>>>>
>>>
>>>
>>>--
>>> -Dan Strong
>>> http://www.DanStrong.com
>>
>>---------------------------------------------------------
>> This message is sent to you because you aresubscribed
>>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=topics&category=288
>
>
> ---------------------------------------------------------
> This message is sent to you becauseyou 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=topics&category=288
DOWNLOAD WEBDNA NOW!
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...