Datlst Structure Accessors


Synopsis

(std-datlst-year <datlst>) ; year in 4 digit format

(std-datlst-month <datlst>) ; month [1-12]

(std-datlst-day <datlst>) ; day [1-31]

(std-datlst-hour <datlst>) ; hour [0-23]

(std-datlst-min <datlst>) ; minute [0-59]

(std-datlst-secs <datlst>) ; seconds [0-59.9] (real)

(std-datlst-dow <datlst>) ; day of week, [0-6], Monday - Sunday

Description

These DATLST structure accessors return the slot value of the given calendar list. They should be used instead of CAR,CADR, NTH, ... to increase readibility and enable future updates.

DATLST is a a list of numbers in calendar format (yr mo day hh mm sec):
(year ; 4 digits like 1998

month ; [1-12]

day ; [1-31]

hour ; [0-23]

minute ; [0-59]

seconds ; [0-59.9] real number

[dow] ; [0-6] Monday-Sunday

)

Examples

(setq datlst '(1998 6 19 12 30 17.2253))
(STD-DATLST-YEAR datlst)
=> 1998 (STD-DATLST-DOW datlst)
=> 4 ; =Friday

Arguments

datlst: A list of at least six numbers: (year month day hh mm ss [dow ...]).

Return Value

A number. on Integer

Side Effects

None.

Module

(std-require 'STDTIME)

Defined in STDTIME