lispEn 2017-11-29 18:33:02

A natural language date and time parser for Common Lisp


#lisp #commonLisp #programming #parser


Use CHRONICITY:PARSE to parse date/time strings.


If *NOW* is not set, "now" is assumed to be this instant. All relative

date/time calculations are made with respect to "now".


  (setf chronicity:*now* (chronicity:make-datetime 2009 3 27 12 34 56))

  => @2009-03-27T12:34:56.000000+05:30


  (chronicity:parse "today")

  => @2009-03-27T13:00:00.000000+05:30


  (chronicity:parse "tomorrow" :now (chronicity:make-date 2009 1 1))

  => @2009-01-02T00:00:00.000000+05:30


  (chronicity:parse "3 days from now")

  => @2009-03-30T12:34:56.000000+05:30


  (chronicity:parse "next month")

  => @2009-04-01T00:00:00.000000+05:30


Git of the project:


https://github.com/chaitanyagupta/chronicity


.
También te puede interesar
lisp codeEn 2022-07-13 13:12:00