Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

mhulse/custom.rg.ApDateTimeRule

Repository files navigation

About:

Associated Press formatted date/time Caché Server Page RULE for DTI's Content Publisher system.

More information about the AP style guidelines:

If you imporve upon this code and/or have feedback, please contact me: m@mky.io

Basic usage:

<custom:rg:apdatetime timestamp="#(ts)#" />

See apdt.csp for more usage examples.

Non DTI customers:

If you don't use DTI software, but you still want to use this code, then all you have to do is remove these lines of code:

<csr:class super="dt.common.page.Rule" />

<script language="cache" runat="compiler">
	do ..RenderDTStartTag()
</script>

<script language="cache" runat="compiler">
	do ..RenderDTEndTag()
</script>

Rule parameters:

  • "timestamp" Required. $horolog or ODBC timestamp format.
  • "return" What bits of the date do you want returned? Valid choices are 'timeonly', 'dateonly', 'time', 'meridiem', 'day', 'month' and 'year'. Default is the full date and time.
  • "year" Set to 'yes' if you want the current year returned. Default is to not return the current year.
  • "today" Set to the text you want to return if the day is today. Default is the day number.
  • "noon" Set to the the text you want to return if the time is noon. Default is 12.
  • "midnight" Set to the text you want to return if the time is midnight. Default is 12.
  • "var" Advanced: Name of local variable to use when using as a wrapping tag. Variable name MUST BE UNIQUE!

Changelog:

  • 2011/03/30
    • Initial public release: Uploaded to GitHub.

About

Associated Press formatted date/time Caché Server Page RULE for DTI's Content Publisher system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors