std-today, std-today-long


Synopsis

(std-today) ; today according *DATE-FORMAT-STRING*

(std-today-long) ; today as string in long format, "d.mmmm yyyy"

Description

These two high level date format functions convert the actual date to a string.

The format of STD-TODAY is formatted according the setting of the global variable *DATE-FORMAT-STRING* which defaults to locale conventions which are retrieved at startup by (STD-SYS-LOCALE).

For the US the std-today format string defaults to "m/d/yy".

For Europe it is "dd.mm.yy".

See the Format of Date Format Strings for more details.

The STD-TODAY-LONG format is "d.mmmm yyyy", this is the day as short number, the long monthname as string and the 4 digit year, such as "7.July 1998".

Localized month and weekday names

Translations for month and weekday names are given in STDLOCAL which is loaded if the AutoCAD language is not :ENGLISH. All these localization issues depend on the AutoCAD language and not on the locale setting! If the AutoCAD prompts are english it is assumed that the user understands english month and weekday names too.

However the defaults for the date format strings depend on the locale setting, because this setting is provided by the operating system (Win32: Control Panel: Country settings).

Note for temp. std-sys-locale workaround

So far we have no implementation of STD-SYS-LOCALE.

Currently the default is set per language, for all not english AutoCAD versions to "dd.mm.yy"

Example

(std-today) => "8/24/98"
(setq *DATE-FORMAT-STRING* "dddd, dd. mmm yyyy")
(std-today) 
=> "Sunday, 24. August 1998" (std-today-long) => "24.August 1998"

Arguments

None

Return Value

A string according the appropriate format string.

Side Effects

None.

Module

(std-require 'STDTIME)

#- SMALL

Defined in STDTIME

Foreign week and monthnames are defined in STDLOCAL