conditional or custom date formatting

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

conditional or custom date formatting

French, Shelane
So we have a need to display dates in "AP Style" date formatting. Here are
the style rules:

Always use Arabic figures , without st, nd, rd or th.
When a month isused with a specific date, abbreviate Jan., Feb., Aug.,
Sept., Oct., Nov. and Dec.
When a phrase lists only a month and year, spell out the month and do not
separate the month and the year with commas.
When a phrase refers to a month, day and year, set off the year with
commas.
Use figures except for noon and midnight
Use a.m. or p.m.(with periods)



So for example, you would have "Jan. 1, 2016" or "Sept. 10, 2016" or "May
31, 2016"

So this format wouldn't work for all months:
%b. %-d, Y

So would creating a "new" format key like %P to represent month by these
formatting rules or doing something else with a custom tag.

Shelane French
Workforce Enablement
Livermore Information Technology


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: conditional or custom date formatting

Brad Lindsay
I think the “%” formatting keys are bound to the underlying C library,
so you should create your own custom tag to deal with these rules.

Brad



On May 31, 2016 at 4:57:39 PM, French, Shelane ([hidden email]) wrote:

> So we have a need to display dates in "AP Style" date formatting. Here are
> the style rules:
>
> Always use Arabic figures , without st, nd, rd or th.
> When a month isused with a specific date, abbreviate Jan., Feb., Aug.,
> Sept., Oct., Nov. and Dec.
> When a phrase lists only a month and year, spell out the month and do not
> separate the month and the year with commas.
> When a phrase refers to a month, day and year, set off the year with
> commas.
> Use figures except for noon and midnight
> Use a.m. or p.m.(with periods)
>
>
>
> So for example, you would have "Jan. 1, 2016" or "Sept. 10, 2016" or "May
> 31, 2016"
>
> So this format wouldn't work for all months:
> %b. %-d, Y
>
> So would creating a "new" format key like %P to represent month by these
> formatting rules or doing something else with a custom tag.
>
> Shelane French
> Workforce Enablement
> Livermore Information Technology
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
> the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to:
> Send administrative queries to
>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>