Tags:
create new tag
view all tags
---+ Time Specifications TWiki recognizes the following formats for date/time strings. For all strings the time is optional. * =31 Dec 2001 - 23:59= * =2001/12/31 23:59:59= * =2001.12.31.23.59.59= * =2001/12/31 23:59= * =2001.12.31.23.59= * =2001-12-31T23:59:59= (ISO 8601 format) ISO dates may have a timezone specifier, either Z (for GMT) or a signed difference in hh:mm format. Examples: * =2001-12-31T23:59:59+01:00= * =2001-12-31T23:59Z= #TimeIntervals ---++ Time Intervals Some features of TWiki, such as searches, permit the specification of _time intervals_. A time interval is a period of time, such as "1337 to 1451" (the Hundred Years War) or "9th February 2005 to 26th March 2005" (the Christian season of Lent). The recognized format is a [[#RestrictedInterpretation][restricted interpretation]] of the [[http://en.wikipedia.org/wiki/ISO_8601][ISO standard 8601]]. A string is accepted as a valid time interval string if it conforms to the following grammar: <verbatim> interval ::= date | date '/' date | 'P' duration '/' date | date '/' 'P' duration ; date ::= year ('-' month ('-' day ('T' hour (':' minute (':' second))))) | '$today' | '$now' ; duration ::= NUM unit | duration NUM unit ; unit ::= 'y' | 'm' | 'w' | 'd' | 'h' | 'M' | 'S' year, month, day, hour, minute, second ::= NUM </verbatim> An incompletely specified date will be completed by including as much time as possible. For example, if the start of a date range is specified by just a year, e.g. =1999/2006=, it will be interpreted as starting at January 1st 1999, at zero hours zero minutes zero seconds. Similarly for the end of the range; =2006= will be interpreted as the last second of 2006. If only one date is specified (e.g. the interval string is =1999=) it will be treated as if the same date were the start and the end i.e. =1999-1999=. Thus =1999= is interpreted as the whole of the year 1999. | *You write* | *You mean* | | =2003= | the whole year 2003 | | =2003-03-28T/2003-05-15= | from March 28th to May 15th of the year 2003 | | =P3w/$today= | three weeks until today | | =2003-12-12= | 12th Dec 2003, from 0:00 to 23:59:59 | | =2003= | any time in the year 2003 | | =2003/P20w= | the first 20 weeks of the year 2003 | | =P20w/2003= | the last 20 weeks of the year 2003 | | =$today= | any second during the present day | | =P2d/$today= | today and yesterday | | =P1d/$now= | the last 24 hours | | =$now/P50y= | the next 50 years | #RestrictedInterpretation ---+++ Limitations If you are entering a date at both ends of the time interval string, the end date must include all leading fields, even if these are the same as in the start date. This limitation forms a proper restriction to the ISO8601 standard. i.e. ISO 8601 specifies that =2003-12-12/14= means 12th Dec 2003 00:00 to 14th Dec 2003 23:59:59. However this shorthand is not supported by TWiki and must be written as =2003-12-12/2003-12-14=. __Related topics:__ QuerySearch, TWikiScripts, VarGMTIME2, VarSEARCH, UserDocumentationCategory, AdminDocumentationCategory -- __Contributors:__ TWiki:Main/CrawfordCurrie, TWiki:Main/PeterThoeny
E
dit
|
A
nexar
|
Watch
|
Im
p
rimir
|
H
istórico
: r2
<
r1
|
We
b
|
V
er tópico
|
Ra
w
edit
|
M
ais ações de tópico
Versão do tópico: r2 - 19 Jun 2010
-
TWikiContributor
Home
Site map
Main web
Sandbox web
TWiki web
Web TWiki
User registration
Usuários
Grupos
Índice
Busca
Alterações
Notificações
Fonte RSS
Estatísticas
Preferências
Ver
Raw View
Print version
Find backlinks
History
More topic actions
Editar
Editar modo texto
Attach file or image
Editar preferências do tópico
Marcar novo tópico pai
More topic actions
Referência do usuário
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Manutenção Administrativa
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categorias
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Iniciar sessão
Български
Cesky
Dansk
Deutsch
English
Español
_Français_
Italiano
日本語
한글
Nederlands
Polski
Português
Русский
Svenska
简体中文
簡體中文
E
dit
A
nexar
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Idéias, solicitações, problemas com relação ao TWiki?
Nos dê um retorno
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.TimeSpecifications
.