Skip to content
Snippets Groups Projects
Commit 673c3ab9 authored by Marcus Comstedt's avatar Marcus Comstedt
Browse files

Some changes to facilitate subclassing for calendars such as Julian.

Rev: lib/modules/Calendar.pmod/Gregorian.pmod:1.4
parent 5ef0bea6
No related branches found
No related tags found
No related merge requests found
...@@ -133,8 +133,8 @@ class Year ...@@ -133,8 +133,8 @@ class Year
{ {
if (!sizeof(arg)) if (!sizeof(arg))
{ {
mapping t=localtime(time()); object yp=vDay()->year();
y=1900+t->year; y=yp->y;
} }
else else
y=arg[0]; y=arg[0];
...@@ -331,9 +331,9 @@ class Month ...@@ -331,9 +331,9 @@ class Month
{ {
if (!sizeof(arg)) if (!sizeof(arg))
{ {
mapping t=localtime(time()); object mp=vDay()->month();
y=1900+t->year; y=mp->y;
m=t->mon+1; m=mp->m;
} }
else else
{ {
...@@ -745,7 +745,7 @@ class Day ...@@ -745,7 +745,7 @@ class Day
int julian_day() int julian_day()
{ {
return vYear(y)->julian_day()+d; return vYear(y)->julian_day(d);
} }
int year_day() int year_day()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment