summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:05:13 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:05:13 -0800
commit2545f8505692c35bc93150c506d3493039db86df (patch)
tree5154700f334635e3f41921361d71ef8699e34ebf /src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
parent66a722ac805f822dbfb4f5d1b76b315b426b9e26 (diff)
downloadDotNetOpenAuth-2545f8505692c35bc93150c506d3493039db86df.zip
DotNetOpenAuth-2545f8505692c35bc93150c506d3493039db86df.tar.gz
DotNetOpenAuth-2545f8505692c35bc93150c506d3493039db86df.tar.bz2
Fixed JDate calculation so it doesn't break in 2010.
Diffstat (limited to 'src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs')
-rw-r--r--src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
index f046738..3124065 100644
--- a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
+++ b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
@@ -75,7 +75,7 @@ namespace DotNetOpenAuth.BuildTasks {
}
private int CalculateJDate(DateTime date) {
- int yearLastDigit = date.Year % 10;
+ int yearLastDigit = date.Year - 2000; // can actually be two digits in or after 2010
DateTime firstOfYear = new DateTime(date.Year, 1, 1);
int dayOfYear = (date - firstOfYear).Days + 1;
int jdate = yearLastDigit * 1000 + dayOfYear;