Skip to content

Commit

Permalink
Date: support constructor without arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jani Monoses committed Nov 24, 2011
1 parent 3f92e7c commit 829e733
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scripting/toplevel/Date.cpp
Expand Up @@ -94,6 +94,9 @@ ASFUNCTIONBODY(Date,_constructor)
return NULL;
}
}
if (argslen == 0) {
th->datetime = g_date_time_new_now_utc();
} else
if (argslen == 1)
{
//GLib's GDateTime sensibly does not support and store very large year numbers
Expand Down

0 comments on commit 829e733

Please sign in to comment.