CrossClj

0.14.4 docs

SourceDocs



RECENT
    VARS
    *local-formatters*
    as-local-date-time-from-time-zone
    as-local-date-time-to-time-zone
    format-local-time
    from-local-string
    ILocalCoerce
    local-now

    « Index of all namespaces of this project

    Functions for working with local time without having to shift
     to/from utc, the preferred time zone of clj-time.core.
    
     Get the current local time with (local-now).
    
     (to-local-date-time obj) returns a local date-time instance
     retaining the time fields.
    
    The following all return 1986-10-14 04:03:27.246 with the
    local time zone.
    
    (to-local-date-time (clj-time.core/date-time 1986 10 14 4 3 27 246))
    (to-local-date-time "1986-10-14T04:03:27.246")
    (to-local-date-time "1986-10-14T04:03:27.246Z")
    
    The dynamic var *local-formatters* contains a map of local formatters
    for parsing and printing. It is initialized with all the formatters in
    clj-time.format localized.
    
    to-local-date-time for strings uses *local-formatters* to parse.
    
    (format-local-time (local-now) :basic-date-time) formats an obj using
    a formatter in *local-formatters* corresponding to the  format-key
    passed in.
    Dynamic
    Map of local formatters for parsing and printing.
    
    Private
    (as-local-date-time-from-time-zone obj)
    Coerce to date-time in the default time zone retaining time fields.
    
    Private
    (as-local-date-time-to-time-zone obj)
    Coerce to date-time in the default time zone.
    
    (format-local-time obj format-key)
    Format obj as local time using the local formatter corresponding
    to format-key.
    Private
    (from-local-string s)
    Return local DateTime instance from string using
    formatters in *local-formatters*, returning first
    which parses.
    protocol
    (to-local-date-time obj)
    convert obj to a local Joda DateTime instance retaining time fields.
    
    (local-now)
    Returns a DateTime for the current instant in the default time zone.