Learn R Programming

googlePublicData (version 0.15.7.28)

checkTimeFormat: DSPL time format verification

Description

Checks if a string fulfills the joda-times class specifications supported by DSPL language.

Usage

checkTimeFormat(fmt)

Arguments

fmt
String representing a time format to be verified.

Value

Logical. TRUE if the string passes the test.

Details

Public Data Explorer currently supports daily, monthly and yearly distributed data. Joda-time, the corresponding time format on wich DSPL times is based, allows declaring time formats using small case "d" (for days), capitalized "M" (for months) and small case "y" for years. Some examples:
Format Specification
Data Example
"yyyy"
1988
"yyyy-MM"
1988-03
"yyyy-MMM"
1988-Mar

References

See Also

See also dspl

Examples

Run this code
    checkTimeFormat("yyyy-MM") # TRUE
    checkTimeFormat("MMMyyyy") # TRUE
    checkTimeFormat("mmmyyyy") # FALSE

Run the code above in your browser using DataLab