Skip to content

Commit

Permalink
Consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 2, 2002
1 parent 4a2f031 commit 5319d84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ext/calendar/french.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

#include "sdncal.h"

#define SDN_OFFSET 2375474
#define FRENCH_SDN_OFFSET 2375474
#define DAYS_PER_4_YEARS 1461
#define DAYS_PER_MONTH 30
#define FIRST_VALID 2375840
Expand All @@ -107,7 +107,7 @@ void SdnToFrench(
*pDay = 0;
return;
}
temp = (sdn - SDN_OFFSET) * 4 - 1;
temp = (sdn - FRENCH_SDN_OFFSET) * 4 - 1;
*pYear = temp / DAYS_PER_4_YEARS;
dayOfYear = (temp % DAYS_PER_4_YEARS) / 4;
*pMonth = dayOfYear / DAYS_PER_MONTH + 1;
Expand All @@ -128,7 +128,7 @@ long int FrenchToSdn(
return ((year * DAYS_PER_4_YEARS) / 4
+ (month - 1) * DAYS_PER_MONTH
+ day
+ SDN_OFFSET);
+ FRENCH_SDN_OFFSET);
}

char *FrenchMonthName[14] =
Expand Down
6 changes: 3 additions & 3 deletions ext/calendar/julian.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@

#include "sdncal.h"

#define SDN_OFFSET 32083
#define JULIAN_SDN_OFFSET 32083
#define DAYS_PER_5_MONTHS 153
#define DAYS_PER_4_YEARS 1461

Expand All @@ -169,7 +169,7 @@ void SdnToJulian(
*pDay = 0;
return;
}
temp = (sdn + SDN_OFFSET) * 4 - 1;
temp = (sdn + JULIAN_SDN_OFFSET) * 4 - 1;

/* Calculate the year and day of year (1 <= dayOfYear <= 366). */
year = temp / DAYS_PER_4_YEARS;
Expand Down Expand Up @@ -236,7 +236,7 @@ long int JulianToSdn(
return ((year * DAYS_PER_4_YEARS) / 4
+ (month * DAYS_PER_5_MONTHS + 2) / 5
+ inputDay
- SDN_OFFSET);
- JULIAN_SDN_OFFSET);
}

/*
Expand Down

0 comments on commit 5319d84

Please sign in to comment.