Add timestamp parameters
* base.xml: Modify documentation to discourage DATE_TIME. * datetime.xml (timestamp_*): Add params.master
parent
18fe43b38f
commit
99d52f9559
|
@ -51,7 +51,8 @@
|
||||||
a proper value representing the current year.
|
a proper value representing the current year.
|
||||||
|
|
||||||
\todo{TAME is deterministic with this one exception; remove it and
|
\todo{TAME is deterministic with this one exception; remove it and
|
||||||
have users use a param instead if they need this datum.}
|
have users use the params from {\tt datetime} instead if they need this
|
||||||
|
datum.}
|
||||||
|
|
||||||
<const name="__DATE_YEAR__" magic="true"
|
<const name="__DATE_YEAR__" magic="true"
|
||||||
value="0" type="integer"
|
value="0" type="integer"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2015 LoVullo Associates, Inc.
|
Copyright (C) 2015, 2017 LoVullo Associates, Inc.
|
||||||
|
|
||||||
This file is part of tame-core.
|
This file is part of tame-core.
|
||||||
|
|
||||||
|
@ -25,13 +25,38 @@
|
||||||
<import package="base" />
|
<import package="base" />
|
||||||
|
|
||||||
|
|
||||||
|
Providing the current timestamp externally allows the system to be
|
||||||
|
wholly deterministic.
|
||||||
|
It also captures the state of the data in time,
|
||||||
|
so re-calculating in the future (e.g. using the summary pages)
|
||||||
|
will yield the same result.
|
||||||
|
|
||||||
|
<param name="timestamp_current" type="integer" default="0"
|
||||||
|
desc="Unix timestamp representing the current time of the
|
||||||
|
system (clock time), as it should be perceived" />
|
||||||
|
|
||||||
|
This system does not handle its own arthiemtic to figure out the
|
||||||
|
current date components from the given timestamp.
|
||||||
|
|
||||||
|
<param name="timestamp_year" type="integer" default="0"
|
||||||
|
desc="Current year (clock time), as it should be perceived" />
|
||||||
|
|
||||||
|
<param name="timestamp_month" type="integer" default="0"
|
||||||
|
desc="Current month (clock time), as it should be perceived;
|
||||||
|
1-indexed" />
|
||||||
|
|
||||||
|
<param name="timestamp_day" type="integer" default="0"
|
||||||
|
desc="Current day (clock time), as it should be perceived;
|
||||||
|
1-indexed" />
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Determines how many years the given date is relative to the current date
|
Determines how many years the given date is relative to the current date
|
||||||
|
|
||||||
Note that a positive number will be returned if the given date is in the past,
|
Note that a positive number will be returned if the given date is
|
||||||
negative if in the future.
|
in the past, negative if in the future.
|
||||||
-->
|
-->
|
||||||
<template name="_ageYears_" desc="Age in years of the given date relative to the current">
|
<template name="_age-years_" desc="Age in years of the given date relative to the current">
|
||||||
<param name="@generates@" desc="Generator variable, per index" />
|
<param name="@generates@" desc="Generator variable, per index" />
|
||||||
<param name="@yearset@" desc="Set of years to iterate on" />
|
<param name="@yearset@" desc="Set of years to iterate on" />
|
||||||
<param name="@sym@" desc="Generator symbol" />
|
<param name="@sym@" desc="Generator symbol" />
|
||||||
|
@ -76,7 +101,7 @@
|
||||||
</c:when>
|
</c:when>
|
||||||
|
|
||||||
<c:sum label="Calculate by subtracting the given year from the current year">
|
<c:sum label="Calculate by subtracting the given year from the current year">
|
||||||
<c:value-of name="__DATE_YEAR__" />
|
<c:value-of name="timestamp_year" />
|
||||||
|
|
||||||
<c:product>
|
<c:product>
|
||||||
<c:value-of name="NEGATE" />
|
<c:value-of name="NEGATE" />
|
||||||
|
|
Loading…
Reference in New Issue