Skip to content

Instantly share code, notes, and snippets.

@ztirom
Last active August 29, 2016 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztirom/3a4b2b6cb16689639357d775d0ef1001 to your computer and use it in GitHub Desktop.
Save ztirom/3a4b2b6cb16689639357d775d0ef1001 to your computer and use it in GitHub Desktop.
DateTimeAddYear
static void DateTimeAddYear(Args _args)
{
utcDateTime todayPlusOneYear,
// Get the actual UTCDateTime based on the current system
todaysDateTime = DateTimeUtil::utcNow();
// Convert it to a string, just to show in on the info log
info(DateTimeUtil::toStr(todaysDateTime));
// Now add a year
todayPlusOneYear = DateTimeUtil::addYears(todaysDateTime, 1);
// And Info it out again
info(DateTimeUtil::toStr(todayPlusOneYear));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment