Skip to content

Commit

Permalink
Add now and today functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonseymour committed Jan 3, 2011
1 parent 7c3727f commit 51d194f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bin/geoloc.sh
Expand Up @@ -318,6 +318,22 @@ EOF
dispatch "$@"
}

#
# The current second in the form yyyymmddThhmmss
#
now()
{
date +%Y%m%dT%H%M%S
}

#
# The current day in the form yyyymmdd
#
today()
{
date +%Y%m%d
}

check_init()
{
test -f ${GEOLOC_HOME}/js/lib.js || die "fatal: GEOLOC_HOME=$GEOLOC_HOME looks incorrect"
Expand Down

0 comments on commit 51d194f

Please sign in to comment.