Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 776 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 776 Bytes

time

A lightweight time library and datatype for Carp.

Installation

(load "[email protected]:carpentry-org/[email protected]")

Usage

This library exports two important datatypes, Datetime and Timedelta. Datetime is meant to be a low friction datatype; this means that it should be relatively easy to create, modify, and convert to other types!

Timedelta is used to add and subtract anything on the scale of seconds to weeks from those times.

(load "[email protected]:carpentry-org/[email protected]")

(defn main []
  (println*
    &(Datetime.strftime
      &(Timedelta.sub &(Datetime.now) &(Timedelta.days 2))
      "%Y-%m-%d %I:%M:%S.%n %p %z")))

You can find the API documentation online!


Have fun!