summaryrefslogtreecommitdiffstats
path: root/DDate.vala
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2010-06-03 03:13:37 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2010-06-03 03:13:37 +0200
commit61eb83337daac43e6c048549c0300bdde7af158a (patch)
tree464628e339f43ddfce6a27fc1722e225e814cb01 /DDate.vala
parent39e513b0f0d03e0886ef2f201fc3d9e1e6186f8b (diff)
downloaddclock-master.tar
dclock-master.zip
Fixed some off-by-one bugsHEADmaster
Diffstat (limited to 'DDate.vala')
-rw-r--r--DDate.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/DDate.vala b/DDate.vala
index b29944d..7f9654d 100644
--- a/DDate.vala
+++ b/DDate.vala
@@ -66,14 +66,14 @@ public struct DDate {
}
public uchar get_day() {
- return (uchar)(get_day_of_year() % 73);
+ return (uchar)(((get_day_of_year()-1) % 73) + 1);
}
public DDateMonth get_month() {
if(is_st_tibs_day())
return DDateMonth.ST_TIBS_DAY;
- return (DDateMonth)(get_day_of_year()/73);
+ return (DDateMonth)((get_day_of_year()-1)/73);
}
public DDateWeekday get_weekday() {