One More Push!


I have 25 years, 6 months, 4 days, 48 minutes and 1 second Until I have to present the majority of my Final Project for my class. I`m not planning on sleeping tonight.

I don`t know what I`d do without Framemaker and CodeWarrior - without them I`d be sunk!

Well, more than I am now anyway.

Ok, which can of RedBull is the full one?

<countdown/>

This tag can count days, minutes, months, etc. from a specified date or time. It can also give the time to or from a few special events. See below for a full list.

Time:

Attributes

year
year=number

Sets the year to count down to.

month
month={number, month_name}

Sets the month to count down to. If given as a number January is 1.

day
day={number, day_name}

Sets the weekday to count down to. If given as a number Sunday is 1.

mday
mday=number

Sets the day of the month to count down to.

hour
hour=number

Sets the hour to count down to.

minute
minute=number

Sets the minute to count down to.

second
second=number

Sets the second to count down to.

iso
iso=year-month-day

Sets the year, month and day to count down to. (YYYY-MM-DD, YYYYMMDD or YYYY-MMM-DD).


<countdown iso='2020-FEB-12'/>
-2079 day

event
event=easter,gregorian-easter,julian-easter,christmas,christmas-day,christmas-eve

Sets the time of an event to count down to.

years
years=number

Add this number of years to the result.

months
months=number

Add this number of months to the result.

weeks
weeks=number

Add this number of weeks to the result.

days
days=number

Add this number of days to the result.

hours
hours=number

Add this number of hours to the result.

beats
beats=number

Add this number of beats to the result.

minutes
minutes=number

Add this number of minutes to the result.

seconds
seconds=number

Add this number of seconds to the result.

now
now=year-month-day

Sets the 'present' time, if other than really present time. (YYYY-MM-DD, YYYYMMDD or YYYY-MMM-DD)


<countdown now="1999-12-24" year="2000" display="days"/>
8

Presentation:

display
display={when, years, months, weeks, days, hours, beats, minutes, seconds, combined, dogyears, boolean}
  • display=when

    Shows when the time will occur. All arguments that are valid in can be used to modify the display.

  • display=years

    How many years until the time.

  • display=months

    How many months until the time.

  • display=weeks

    How many weeks until the time.

  • display=days

    How many days until the time.

  • display=hours

    How many hours until the time.


    <countdown day='friday' display='hours'/>
    56
  • display=beats

    How many beats until the time.

  • display=minutes

    How many minutes until the time.

  • display=seconds

    How many seconds until the time.

  • display=combined

    Shows an english text describing the time period. Example: 2 days, 1 hour and 5 seconds. You may use the 'prec' attribute to limit how precise the description is. Also, you can use the 'month' attribute if you want to see years/months/days instead of years/weeks/days.


    The world will go under in <countdown year='2038' display='combined' prec='day'/>.
    The world will go under in 12 years, 2 months and 10 days.
  • display=dogyears

    How many dog-years until the time. (With one decimal)


    <countdown years='2' display='dogyears'/>
    14.0
  • display=boolean

    Return true or false (1 or 0), depending on if the time is now or not. The fuzziness of 'now' is decided by the 'prec' option.


    <b>Is this a Sunday?</b>
    <define variable='var.test' preparse=''><countdown day='sunday' display='boolean'/></define>
    <if variable='var.test = 1'>Yes, this is a Sunday.</if>
    <else>No, it isn't.</else>
    Is this a Sunday? No, it isn't.
  • type
    type=type

    As for 'date'. Useful values for type include string, number and ordered.

    lang
    lang=langcodes

    The language in which the result should be written if the type is string.


    Heute ist es ungefähr <countdown event='christmas' display='months' type='string' lang='de'/> Monate bis Weinachten.
    Heute ist es ungefähr zwei Monate bis Weinachten.

    since

    Negate the period of time.


     I am <countdown iso='1980-06-28' since='' display='years' type='string'/> years old.
    I am fortyfive years old.

    next

    Always count down to the next event. <countdown day='friday' next=''> says 6 on a friday as opposed to 0 without the next attribute.


    It is <countdown day='monday' next=''/> to monday.
    It is 5 days to monday.

    prec
    prec={year, month, week, day, hour, minute, second}

    Modifies the precision for 'boolean'- and 'combined'-arguments.