If Julian is valid, we have to update the dmy representation before
authorHavoc Pennington <hp@pobox.com>
Wed, 2 Dec 1998 23:47:02 +0000 (23:47 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Wed, 2 Dec 1998 23:47:02 +0000 (23:47 +0000)
1998-12-02  Havoc Pennington  <hp@pobox.com>

* gdate.c (g_date_set_month): If Julian is valid, we have to
update the dmy representation before setting the components
of it.
(g_date_set_day): Same.
(g_date_set_year): Same.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdate.c
glib/gdate.c

index 3d03258..f8489e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
index 3d03258..f8489e3 100644 (file)
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
index 3d03258..f8489e3 100644 (file)
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
index 3d03258..f8489e3 100644 (file)
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
index 3d03258..f8489e3 100644 (file)
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
index 3d03258..f8489e3 100644 (file)
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
index 3d03258..f8489e3 100644 (file)
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
index 3d03258..f8489e3 100644 (file)
@@ -1,5 +1,13 @@
 1998-12-02  Havoc Pennington  <hp@pobox.com>
 
+       * gdate.c (g_date_set_month): If Julian is valid, we have to 
+       update the dmy representation before setting the components
+       of it.
+       (g_date_set_day): Same.
+       (g_date_set_year): Same.
+
+1998-12-02  Havoc Pennington  <hp@pobox.com>
+
        * testgdate.c, testgdateparser.c: Two new files. This is kind of 
        ugly code, but I want to go ahead and make the tests available. 
        It isn't contaminating any other code. :-) Since one of these 
diff --git a/gdate.c b/gdate.c
index c8569fb..69c337d 100644 (file)
--- a/gdate.c
+++ b/gdate.c
@@ -802,7 +802,8 @@ g_date_set_month (GDate     *d,
 {
   g_return_if_fail (d != NULL);
   g_return_if_fail (g_date_valid_month (m));
-  
+
+  if (d->julian && !d->dmy) g_date_update_dmy(d);
   d->julian = FALSE;
   
   d->month = m;
@@ -820,6 +821,7 @@ g_date_set_day (GDate     *d,
   g_return_if_fail (d != NULL);
   g_return_if_fail (g_date_valid_day (day));
   
+  if (d->julian && !d->dmy) g_date_update_dmy(d);
   d->julian = FALSE;
   
   d->day = day;
@@ -837,6 +839,7 @@ g_date_set_year (GDate     *d,
   g_return_if_fail (d != NULL);
   g_return_if_fail (g_date_valid_year (y));
   
+  if (d->julian && !d->dmy) g_date_update_dmy(d);
   d->julian = FALSE;
   
   d->year = y;
index c8569fb..69c337d 100644 (file)
@@ -802,7 +802,8 @@ g_date_set_month (GDate     *d,
 {
   g_return_if_fail (d != NULL);
   g_return_if_fail (g_date_valid_month (m));
-  
+
+  if (d->julian && !d->dmy) g_date_update_dmy(d);
   d->julian = FALSE;
   
   d->month = m;
@@ -820,6 +821,7 @@ g_date_set_day (GDate     *d,
   g_return_if_fail (d != NULL);
   g_return_if_fail (g_date_valid_day (day));
   
+  if (d->julian && !d->dmy) g_date_update_dmy(d);
   d->julian = FALSE;
   
   d->day = day;
@@ -837,6 +839,7 @@ g_date_set_year (GDate     *d,
   g_return_if_fail (d != NULL);
   g_return_if_fail (g_date_valid_year (y));
   
+  if (d->julian && !d->dmy) g_date_update_dmy(d);
   d->julian = FALSE;
   
   d->year = y;