Date variables

Top  Previous  Next

If an URL contains a daily date, you can use a date variable that will be replaced with the real date when the bookmark is checked.

 

Example on an URL with a date variable:

http://www.domain.com/file<$date$,'yyyy-mm-dd',0>.htm

 

Resulting URL:

http://www.domain.com/file2009-03-15.htm

Usage

<$date$,format,DayDifference>

<$date$,format,DayDifference,MonthNames>

 

If the date format contains the variable 'mmm' or 'mmmm' for month names, WebSite-Watcher will automatically use English names. If you need localized month names, you can define them with the parameter MonthNames. You have to define exactly 12 names separated with a colon, for example jan:feb:mae:apr:mai:jun:jul:aug:sep:okt:nov:dez.

Date format

yy

current year with 2 digits

yyyy

current year with 4 digits

m

current month with 1 or 2 digits, no leading zero (1-12)

mm

current month with 2 digits, leading zero (01-12)

mmm

name of current month, 3 characters (jan, feb...)

mmmm

full name of current month

d

current day with 1 or 2 digits, no leading zero (1-31)

dd

current day with 2 digits, leading zero (01-31)

hh

hours

nn

minutes

ss

seconds

"xx"

Characters enclosed in quotes are displayed as-is, and do not affect formatting.

Day difference

The parameter DayDifference lets you add/subtract the specified number of days to/from the current date.

 

0 ... current date
1 ... tomorrow
-1 ... yesterday
-2 ... the day before yesterday

 

If you append the character "h", "m" or "s" to the parameter, then the value will added to hours, minutes or seconds.

 

1h ... plus one hour
-100m ... minus 100 minutes
5s ... plus 5 seconds

 

 

Examples:

 

http://www.domain.com/file<$date$,'yyyy-mm-dd',0>.htm

http://www.domain.com/changes<$date$,'yy-mm',0>.txt

http://www.domain.com/events-<$date$,'mmm-dd',1>.html

http://www.domain.com/news_<$date$,'mmmmyyyy',0,jan:feb:mae:apr:mai:jun:jul:aug:sep:okt:nov:dez>.html