skip to main content
Corticon Server: Integration & Deployment Guide : Configuring Corticon properties and settings : Common properties : Date/time formats in CcCommon.properties
 

Try Corticon Now
Date/time formats in CcCommon.properties
Corticon Studio's DateTime datatype uses both date and time data. The Date datatype handles only date information, and the Time datatype handles only time information.
The Corticon XML Translator will maintain the consistency of DateTime, Date, and Time values from input to output documents as long as the masks that are used are contained in the lists.
Note: Date/time formats are Common properties that are stored as a set of defaults in the CcCommon.properties file that is packaged in the CcConfig.jar. Do not edit the CcCommon.properties file. Instead, always set override values in the brms.properties file located at your work directory root --or, in Studio, the preferred location specified in Preferences.
The first entry for each dateformat, datetimeformat, and timeformat is the default mask. For example, the built-in operator today always returns the current date in the default dateformat mask. The function now returns the current date in the default datetimeformat.The entries can be altered but must conform to the patterns/masks supported by the Java class SimpleDateFormat in the java.text package.
com.corticon.crml.OclDate.dateformat=
MM/dd/yy;
MM/dd/yyyy;
M/d/yy;
M/d/yyyy;
yyyy/MM/dd;
yyyy-MM-dd;
yyyy/M/d;
yy/MM/dd;
yy/M/d;
MMM d, yyyy;
MMMMM d, yyyy
com.corticon.crml.OclDate.datetimeformat=
MM/dd/yy h:mm:ss a;
MM/dd/yyyy h:mm:ss a;
M/d/yy h:mm:ss a;
M/d/yyyy h:mm:ss a;
yyyy/MM/dd h:mm:ss a;
yyyy/M/d h:mm:ss a;
yy/MM/dd h:mm:ss a;
yy/M/d h:mm:ss a;
MMM d, yyyy h:mm:ss a;
MMMMM d, yyyy h:mm:ss a;

MM/dd/yy H:mm:ss;
MM/dd/yyyy H:mm:ss;
M/d/yy H:mm:ss;
M/d/yyyy H:mm:ss;
yyyy/MM/dd H:mm:ss;
yyyy/M/d H:mm:ss;
yy/MM/dd H:mm:ss;
yy/M/d H:mm:ss;
MMM d, yyyy H:mm:ss;
MMMMM d, yyyy H:mm:ss;

MM/dd/yy hh:mm:ss a;
MM/dd/yyyy hh:mm:ss a;
M/d/yy hh:mm:ss a;
M/d/yyyy hh:mm:ss a;
yyyy/MM/dd hh:mm:ss a;
yyyy/M/d hh:mm:ss a;
yy/MM/dd hh:mm:ss a;
yy/M/d hh:mm:ss a;
MMM d, yyyy hh:mm:ss a;
MMMMM d, yyyy hh:mm:ss a;

MM/dd/yy HH:mm:ss;
MM/dd/yyyy HH:mm:ss;
M/d/yy HH:mm:ss;
M/d/yyyy HH:mm:ss;
yyyy/MM/dd HH:mm:ss;
yyyy/M/d HH:mm:ss;
yy/MM/dd HH:mm:ss;
yy/M/d HH:mm:ss;
MMM d, yyyy HH:mm:ss;
MMMMM d, yyyy HH:mm:ss;

MM/dd/yy h:mm:ss a z;
MM/dd/yyyy h:mm:ss a z;
M/d/yy h:mm:ss a z;
M/d/yyyy h:mm:ss a z;
yyyy/MM/dd h:mm:ss a z;
yyyy/M/d h:mm:ss a z;
yy/MM/dd h:mm:ss a z;
yy/M/d h:mm:ss a z;
MMM d, yyyy h:mm:ss a z;
MMMMM d, yyyy h:mm:ss a z;

MM/dd/yy H:mm:ss z;
MM/dd/yyyy H:mm:ss z;
M/d/yy H:mm:ss z;
M/d/yyyy H:mm:ss z;
yyyy/MM/dd H:mm:ss z;
yyyy/M/d H:mm:ss z;
yy/MM/dd H:mm:ss z;
yy/M/d H:mm:ss z;
MMM d, yyyy H:mm:ss z;
MMMMM d, yyyy H:mm:ss z;

MM/dd/yy hh:mm:ss a z;
MM/dd/yyyy hh:mm:ss a z;
M/d/yy hh:mm:ss a z;
M/d/yyyy hh:mm:ss a z;
yyyy/MM/dd hh:mm:ss a z;
yyyy/M/d hh:mm:ss a z;
yy/MM/dd hh:mm:ss a z;
yy/M/d hh:mm:ss a z;
MMM d, yyyy hh:mm:ss a z;
MMMMM d, yyyy hh:mm:ss a z;

MM/dd/yy HH:mm:ss z;
MM/dd/yyyy HH:mm:ss z;
M/d/yy HH:mm:ss z;
M/d/yyyy HH:mm:ss z;
yyyy/MM/dd HH:mm:ss z;
yyyy/M/d HH:mm:ss z;
yy/MM/dd HH:mm:ss z;
yy/M/d HH:mm:ss z;
MMM d, yyyy HH:mm:ss z;
MMMMM d, yyyy HH:mm:ss z
com.corticon.crml.OclDate.timeformat=
h:mm:ss a;
h:mm:ss a z;
H:mm:ss;
H:mm:ss z;
hh:mm:ss a;
hh:mm:ss a z;
HH:mm:ss;
HH:mm:ss z
------------------------------------------------------------
Determines the Default Date to be used when instantiating or converting to Time data values. It is important that this property matches the database date and date format so that there is consistency between Time values inserted into the database directly and those inserted into the database by rules. Default Date value: 1970-01-01. Default DateFormat value: yyyy-MM-dd
com.corticon.crml.OclDate.defaultDateForTimeValues=1970-01-01
com.corticon.crml.OclDate.defaultDateFormatForTimeValues= yyyy-MM-dd
------------------------------------------------------------
When com.corticon.crml.OclDate.locale=true, it will override the default datetime mask and use the locale mask as the date style type defined by com.corticon.crml.OclDate.datetype and the time style type defined by com.corticon.crml.OclDate.typetype.

com.corticon.crml.OclDate.locale=false
com.corticon.crml.OclDate.datetype=3
com.corticon.crml.OclDate.timetype=2
------------------------------------------------------------
If permissive is true (default), then the Corticon date/time parser will be lenient when handling incoming or entered date/times, trying to find a match even if the pattern is not contained in the mask lists. If false, then any incoming or entered date/time must strictly adhere to the patterns defined by dateformat,   datetimeformat,   timeformat.
Default patterns are for United States and other countries that follow the US conventions on date/times.
com.corticon.crml.OclDate.permissive =true
------------------------------------------------------------
If maskliterals is true (default), the system will parse strings and dates more quickly by checking for the presence of mask literals (for example, /, -, : or ,) before consulting the date masks (an expensive process). If a string does not contain any of the mask literal characters, it can be immediately deemed a string (as opposed to a date).
com.corticon.crml.OclDate.maskliterals =true
To take advantage of this feature, all user-specified date masks must contain at least one literal character. If any user-specified masks contain exclusively date pattern characters (for example, MMddyy), maskliterals must be set to false in order to prevent the system from misinterpreting date literals (for example, '123199') as simple strings.
These properties deal with the way Corticon Studio and Corticon Server handle date/time formats. Preset formats, or masks are used to:
*Process incoming date/times on request XML payloads.
*Insert date/times into output response XML payloads.
*Parse entries made in the Corticon Studio Rulesheets, Vocabulary, and Tests.
*To display any date/time in Corticon Studio.
Masks are divided into 3 categories: dateformat, datetimeformat, timeformat.
Use the following chart to decode the date mask formats:
The following symbols are used in date/time masks:
Symbol
Meaning
Presentation
Patterns
G
Era Designator
Text
G = {AD, BC}
y
Year
Number
yy = {00..99}
yyyy = {0000..9999}
M
Month of the year
Text or Number
M = {1..12}
MM = {01..12}
MMM = {Jan..Dec}
MMMM = {January..December}
d
day of the month
Number
d = {1..31}
dd = {01..31}
h
hour in AM or PM
Number
h = {1..12}
hh = {01..12}
H
hour in 24-hour format (0-23)
Number
H = {0..23}
HH = {00..23}
m
minute of the hour
Number
m = {0..59}
mm = {00..59}
s
second of the minute
Number
s = {0..59}
ss = {00..59}
S
millisecond of the minute
Number
S = {0..999}
SSS = {000..999}
E
day of the week
Text
E, EE, or EEE = {Sun..Sat}
EEEE = {Sunday..Saturday}
D
day of the year
Number
D = {0..366}
DDD = {000..366}
F
day of week in the month
Number
F = {0..6}
w
week of the year
Number
w = {1..53}
ww = {01..53}
W
week of the month
Number
W = {1..6}
a
AM/PM marker
Text
a = {AM, PM}
k
hour of the day (1-24)
Number
k = {1..24}
kk = {01..24}
K
hour in AM/PM
Number
K = {1..12}
KK = {01..12}
z
time zone
Text
z, zz, or zzz = abbreviated time zone
zzzz = full time zone
`
escape character used to insert text
Delimiter
 
single quote
Literal
Any characters in the pattern that are not in the ranges of [a..z] and [A..Z] will be treated as quoted text. For instance, characters like {:, ., <space>, #, @} will appear in the resulting time text even they are not embraced within single quotes. A pattern containing any invalid pattern letter will result in a thrown exception during formatting or parsing.
Examples:
Sample Pattern
Resulting Formatted Date
yyyy.MM.dd G 'at' hh:mm:ss z
2013.07.10 AD at 15:08:56 PDT
EEE, MMM d, ''yy
Wed, Jul 10, '13
h:mm a
12:08 PM
hh 'o''clock' a, zzzz
12 o'clock PM, Pacific Daylight Time
K:mm a, z
0:00 PM, PST
yyyy.MMMM.dd G h:mm a
2013.July.10 AD 12:08 PM
Note: Property settings you list in your brms.properties do not append to an existing list, they replace the default values. For example, if you want to add a new DateTime mask to the built-in list, be sure to include all the masks you intend to use, not just the new one. If your brms.properties file contains only the new mask, then it will be the only mask Corticon uses.