Changeset 38294 in project


Ignore:
Timestamp:
03/17/20 06:59:15 (3 weeks ago)
Author:
Kon Lovett
Message:

add date to/from string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/srfi-19

    r38293 r38294  
    105105
    106106Converts a SRFI-18 time object into a SRFI-19 {{time-duration}} object.
    107 
    108 ==== Object Printing
    109 
    110 ===== time-record-printer-format
    111 
    112 <procedure>(time-record-printer-format [FORM]) -> (or symbol boolean)</procedure>
    113 
    114 {{FORM}} is {{'srfi-10}} or  {{'#f}}.
    115 
    116 The {{'srfi-10}} form is '''DEPRECATED'''.
    117 
    118 ===== date-record-printer-format
    119 
    120 <procedure>(date-record-printer-format [FORM]) -> (or symbol boolean)</procedure>
    121 
    122 {{FORM}} is {{'srfi-10}} or  {{'#f}}.
    123 
    124 The {{'srfi-10}} form is '''DEPRECATED'''.
    125107
    126108==== Time Conversion
     
    496478===== format-date
    497479
    498 <procedure>(format-date DESTINATION DATE-FORMAT-STRING DATE)</procedure>
    499 <procedure>(format-date DATE-FORMAT-STRING DATE) -> {{string}}</procedure>
     480<procedure>(format-date DESTINATION DATE-FORMAT DATE)</procedure>
     481<procedure>(format-date DATE-FORMAT DATE) -> {{string}}</procedure>
    500482
    501483Displays a text form of the {{DATE}} on the {{DESTINATION}} using the
    502 {{DATE-FORMAT-STRING}}.
     484{{DATE-FORMAT}}.
    503485
    504486; {{DESTINATION}} :                 ; the result is returned as a string.
     
    510492===== scan-date
    511493
    512 <procedure>(scan-date SOURCE TEMPLATE-STRING)</procedure>
     494<procedure>(scan-date SOURCE TEMPLATE) -> date</procedure>
    513495
    514496Reads a text form of a date from the {{SOURCE}}, following the
    515 {{TEMPLATE-STRING}}, and returns a date object.
     497{{TEMPLATE}}, and returns a date object.
    516498
    517499; {{SOURCE}} : {{#t}}         ; {{(current-input-port)}}.
     
    522504d-m-y, is completed with from the {{(current-date)}}, as is any
    523505timezone information, and missing h:m:s:ns are {{0}}.
     506
     507===== string->date
     508
     509<procedure>(string->date SOURCE [TEMPLATE]) -> date</procedure>
     510
     511; {{SOURCE}} : see {{scan-date}}.
     512; {{TEMPLATE}} : {{string}} ; default {{(localized-template/default 'srfi-19 'date-time)}}.
     513
     514===== date->string
     515
     516<procedure>(date->string DATE [DATE-FORMAT]) -> date</procedure>
     517
     518; {{DATE}} : {{date}}
     519; {{DATE-FORMAT}} : {{string}} ; default {{"~c"}}.
    524520
    525521=== Date/Time Literals
     
    840836* Using {{date-adjust}} for the same {{date-key}} MomentJS says:
    841837
    842 <blockquote>
    843838If you are adding hours, minutes, seconds, or milliseconds, the assumption is
    844839that you want precision to the hour, and will result in a different hour.
    845 </blockquote>
    846840
    847841<enscript language=javascript>
Note: See TracChangeset for help on using the changeset viewer.