gtk-doc fixups for glib/
[platform/upstream/glib.git] / docs / reference / glib / tmpl / date.sgml
1 <!-- ##### SECTION Title ##### -->
2 Date and Time Functions
3
4 <!-- ##### SECTION Short_Description ##### -->
5 calendrical calculations and miscellaneous time stuff
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GDate data structure represents a day between January 1, Year 1,
10 and sometime a few thousand years in the future (right now it will go
11 to the year 65535 or so, but g_date_set_parse() only parses up to the
12 year 8000 or so - just count on "a few thousand"). #GDate is meant to
13 represent everyday dates, not astronomical dates or historical dates
14 or ISO timestamps or the like. It extrapolates the current Gregorian
15 calendar forward and backward in time; there is no attempt to change
16 the calendar to match time periods or locations. #GDate does not store
17 time information; it represents a <emphasis>day</emphasis>.
18 </para>
19
20 <para>
21 The #GDate implementation has several nice features; it is only a
22 64-bit struct, so storing large numbers of dates is very efficient. It
23 can keep both a Julian and day-month-year representation of the date,
24 since some calculations are much easier with one representation or the
25 other. A Julian representation is simply a count of days since some
26 fixed day in the past; for #GDate the fixed day is January 1, 1 AD.
27 ("Julian" dates in the #GDate API aren't really Julian dates in the
28 technical sense; technically, Julian dates count from the start of the
29 Julian period, Jan 1, 4713 BC).
30 </para>
31
32 <para>
33 #GDate is simple to use. First you need a "blank" date; you can get a
34 dynamically allocated date from g_date_new(), or you can declare an
35 automatic variable or array and initialize it to a sane state by
36 calling g_date_clear(). A cleared date is sane; it's safe to call
37 g_date_set_dmy() and the other mutator functions to initialize the
38 value of a cleared date. However, a cleared date is initially
39 <emphasis>invalid</emphasis>, meaning that it doesn't represent a day
40 that exists. It is undefined to call any of the date calculation
41 routines on an invalid date. If you obtain a date from a user or other
42 unpredictable source, you should check its validity with the
43 g_date_valid() predicate. g_date_valid() is also used to check for
44 errors with g_date_set_parse() and other functions that can
45 fail. Dates can be invalidated by calling g_date_clear() again.
46 </para>
47
48 <para>
49 <emphasis>It is very important to use the API to access the #GDate
50 struct.</emphasis> Often only the day-month-year or only the Julian
51 representation is valid. Sometimes neither is valid. Use the API.
52 </para>
53
54 <para>
55 GLib also features #GDateTime which represents a precise time.
56 </para>
57
58 <!-- ##### SECTION See_Also ##### -->
59 <para>
60
61 </para>
62
63 <!-- ##### SECTION Stability_Level ##### -->
64
65
66 <!-- ##### SECTION Image ##### -->
67
68
69 <!-- ##### MACRO G_USEC_PER_SEC ##### -->
70 <para>
71 Number of microseconds in one second (1 million). This macro is provided for
72 code readability.
73 </para>
74
75
76
77 <!-- ##### STRUCT GTimeVal ##### -->
78 <para>
79 Represents a precise time, with seconds and microseconds. 
80 Similar to the <structname>struct timeval</structname> returned by 
81 the <function>gettimeofday()</function> UNIX call.
82 </para>
83
84 <para>
85 GLib is attempting to unify around the use of 64bit integers to
86 represent microsecond-precision time.  As such, this type will be
87 removed from a future version of GLib.
88 </para>
89
90 @tv_sec: seconds
91 @tv_usec: microseconds
92
93 <!-- ##### FUNCTION g_get_current_time ##### -->
94 <para>
95 </para>
96
97 @result: 
98
99
100 <!-- ##### FUNCTION g_usleep ##### -->
101 <para>
102 Pauses the current thread for the given number of microseconds. There
103 are 1 million microseconds per second (represented by the
104 #G_USEC_PER_SEC macro). g_usleep() may have limited precision,
105 depending on hardware and operating system; don't rely on the exact
106 length of the sleep.
107 </para>
108
109 @microseconds: number of microseconds to pause
110
111
112 <!-- ##### FUNCTION g_time_val_add ##### -->
113 <para>
114
115 </para>
116
117 @time_: 
118 @microseconds: 
119
120
121 <!-- ##### FUNCTION g_time_val_from_iso8601 ##### -->
122 <para>
123
124 </para>
125
126 @iso_date: 
127 @time_: 
128 @Returns: 
129
130
131 <!-- ##### FUNCTION g_time_val_to_iso8601 ##### -->
132 <para>
133
134 </para>
135
136 @time_: 
137 @Returns: 
138
139
140 <!-- ##### STRUCT GTimeSpec ##### -->
141 <para>
142
143 </para>
144
145 @tv_sec: 
146 @tv_nsec: 
147
148 <!-- ##### STRUCT GDate ##### -->
149 <para>
150 Represents a day between January 1, Year 1 and a few thousand years in
151 the future. None of its members should be accessed directly. If the
152 <structname>GDate</structname> is obtained from g_date_new(), it will
153 be safe to mutate but invalid and thus not safe for calendrical computations.
154 If it's declared on the stack, it will contain garbage so must be
155 initialized with g_date_clear(). g_date_clear() makes the date invalid
156 but sane. An invalid date doesn't represent a day, it's "empty." A
157 date becomes valid after you set it to a Julian day or you set a day,
158 month, and year.
159 </para>
160
161 @julian_days: the Julian representation of the date
162 @julian: this bit is set if @julian_days is valid
163 @dmy: this is set if @day, @month and @year are valid
164 @day: the day of the day-month-year representation of the date, as 
165   a number between 1 and 31
166 @month: the day of the day-month-year representation of the date, as 
167   a number between 1 and 12
168 @year: the day of the day-month-year representation of the date
169
170 <!-- ##### TYPEDEF GTime ##### -->
171 <para>
172 Simply a replacement for <type>time_t</type>. It has been deprecated
173 since it is <emphasis>not</emphasis> equivalent to <type>time_t</type> 
174 on 64-bit platforms with a 64-bit <type>time_t</type>. 
175 Unrelated to #GTimer.
176 </para>
177
178
179 <para>
180 Note that <type>GTime</type> is defined to always be a 32bit integer,
181 unlike <type>time_t</type> which may be 64bit on some systems. 
182 Therefore, <type>GTime</type> will overflow in the year 2038, and
183 you cannot use the address of a <type>GTime</type> variable as argument 
184 to the UNIX time() function. Instead, do the following:
185 <informalexample>
186 <programlisting>
187 time_t ttime;
188 GTime gtime;
189
190 time (&amp;ttime);
191 gtime = (GTime)ttime;
192 </programlisting>
193 </informalexample>
194 </para>
195
196
197 <!-- ##### ENUM GDateDMY ##### -->
198 <para>
199 This enumeration isn't used in the API, but may be useful if you need
200 to mark a number as a day, month, or year.
201 </para>
202
203 @G_DATE_DAY: a day
204 @G_DATE_MONTH: a month
205 @G_DATE_YEAR: a year
206
207 <!-- ##### TYPEDEF GDateDay ##### -->
208 <para>
209 Integer representing a day of the month; between 1 and
210 31. #G_DATE_BAD_DAY represents an invalid day of the month.
211 </para>
212
213
214 <!-- ##### ENUM GDateMonth ##### -->
215 <para>
216 Enumeration representing a month; values are #G_DATE_JANUARY,
217 #G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the invalid value.
218 </para>
219
220 @G_DATE_BAD_MONTH: invalid value
221 @G_DATE_JANUARY: January
222 @G_DATE_FEBRUARY: February
223 @G_DATE_MARCH: March
224 @G_DATE_APRIL: April
225 @G_DATE_MAY: May
226 @G_DATE_JUNE: June
227 @G_DATE_JULY: July
228 @G_DATE_AUGUST: August
229 @G_DATE_SEPTEMBER: September
230 @G_DATE_OCTOBER: October
231 @G_DATE_NOVEMBER: November
232 @G_DATE_DECEMBER: December
233
234 <!-- ##### TYPEDEF GDateYear ##### -->
235 <para>
236 Integer representing a year; #G_DATE_BAD_YEAR is the invalid
237 value. The year must be 1 or higher; negative (BC) years are not
238 allowed. The year is represented with four digits.
239 </para>
240
241
242 <!-- ##### ENUM GDateWeekday ##### -->
243 <para>
244 Enumeration representing a day of the week; #G_DATE_MONDAY,
245 #G_DATE_TUESDAY, etc. #G_DATE_BAD_WEEKDAY is an invalid weekday.
246 </para>
247
248 @G_DATE_BAD_WEEKDAY: invalid value
249 @G_DATE_MONDAY: Monday
250 @G_DATE_TUESDAY: Tuesday
251 @G_DATE_WEDNESDAY: Wednesday
252 @G_DATE_THURSDAY: Thursday
253 @G_DATE_FRIDAY: Friday
254 @G_DATE_SATURDAY: Saturday
255 @G_DATE_SUNDAY: Sunday
256
257 <!-- ##### MACRO G_DATE_BAD_DAY ##### -->
258 <para>
259 Represents an invalid #GDateDay.
260 </para>
261
262
263
264 <!-- ##### MACRO G_DATE_BAD_JULIAN ##### -->
265 <para>
266 Represents an invalid Julian day number.
267 </para>
268
269
270
271 <!-- ##### MACRO G_DATE_BAD_YEAR ##### -->
272 <para>
273 Represents an invalid year.
274 </para>
275
276
277
278 <!-- ##### FUNCTION g_date_new ##### -->
279 <para>
280 Allocates a #GDate and initializes it to a sane state. The new date will
281 be cleared (as if you'd called g_date_clear()) but invalid (it won't
282 represent an existing day). Free the return value with g_date_free().
283 </para>
284
285 @void: 
286 @Returns: a newly-allocated #GDate
287
288
289 <!-- ##### FUNCTION g_date_new_dmy ##### -->
290 <para>
291 Like g_date_new(), but also sets the value of the date. Assuming the
292 day-month-year triplet you pass in represents an existing day, the
293 returned date will be valid.
294 </para>
295
296 @day: day of the month
297 @month: month of the year
298 @year: year
299 @Returns: a newly-allocated #GDate initialized with @day, @month, and @year
300
301
302 <!-- ##### FUNCTION g_date_new_julian ##### -->
303 <para>
304 Like g_date_new(), but also sets the value of the date. Assuming the
305 Julian day number you pass in is valid (greater than 0, less than an
306 unreasonably large number), the returned date will be valid.
307 </para>
308
309 @julian_day: days since January 1, Year 1
310 @Returns: a newly-allocated #GDate initialized with @julian_day
311
312
313 <!-- ##### FUNCTION g_date_clear ##### -->
314 <para>
315 Initializes one or more #GDate structs to a sane but invalid
316 state. The cleared dates will not represent an existing date, but will
317 not contain garbage. Useful to init a date declared on the stack.
318 Validity can be tested with g_date_valid().
319 </para>
320
321 @date: pointer to one or more dates to clear
322 @n_dates: number of dates to clear
323
324
325 <!-- ##### FUNCTION g_date_free ##### -->
326 <para>
327 Frees a #GDate returned from g_date_new().
328 </para>
329
330 @date: a #GDate
331
332
333 <!-- ##### FUNCTION g_date_set_day ##### -->
334 <para>
335 Sets the day of the month for a #GDate. If the resulting day-month-year
336 triplet is invalid, the date will be invalid.
337 </para>
338
339 @date: a #GDate
340 @day: day to set
341
342
343 <!-- ##### FUNCTION g_date_set_month ##### -->
344 <para>
345 Sets the month of the year for a #GDate.  If the resulting
346 day-month-year triplet is invalid, the date will be invalid.
347 </para>
348
349 @date: a #GDate
350 @month: month to set
351
352
353 <!-- ##### FUNCTION g_date_set_year ##### -->
354 <para>
355 Sets the year for a #GDate. If the resulting day-month-year triplet is
356 invalid, the date will be invalid.
357 </para>
358
359 @date: a #GDate
360 @year: year to set
361
362
363 <!-- ##### FUNCTION g_date_set_dmy ##### -->
364 <para>
365 Sets the value of a #GDate from a day, month, and year. The day-month-year 
366 triplet must be valid; if you aren't sure it is, call g_date_valid_dmy() to
367 check before you set it.
368 </para>
369
370 @date: a #GDate
371 @day: day
372 @month: month
373 @y: year
374
375
376 <!-- ##### FUNCTION g_date_set_julian ##### -->
377 <para>
378 Sets the value of a #GDate from a Julian day number.
379 </para>
380
381 @date: a #GDate
382 @julian_date: Julian day number (days since January 1, Year 1)
383
384
385 <!-- ##### FUNCTION g_date_set_time ##### -->
386 <para>
387
388 </para>
389
390 @date: 
391 @time_: 
392
393
394 <!-- ##### FUNCTION g_date_set_time_t ##### -->
395 <para>
396
397 </para>
398
399 @date: 
400 @timet: 
401
402
403 <!-- ##### FUNCTION g_date_set_time_val ##### -->
404 <para>
405
406 </para>
407
408 @date: 
409 @timeval: 
410
411
412 <!-- ##### FUNCTION g_date_set_parse ##### -->
413 <para>
414 Parses a user-inputted string @str, and try to figure out what date it
415 represents, taking the <link linkend="setlocale">current locale</link> 
416 into account. If the string is successfully parsed, the date will be 
417 valid after the call. Otherwise, it will be invalid. You should check 
418 using g_date_valid() to see whether the parsing succeeded.
419 </para>
420
421 <para>
422 This function is not appropriate for file formats and the like; it
423 isn't very precise, and its exact behavior varies with the
424 locale. It's intended to be a heuristic routine that guesses what the
425 user means by a given string (and it does work pretty well in that
426 capacity).
427 </para>
428
429 @date: a #GDate to fill in
430 @str: string to parse
431
432
433 <!-- ##### FUNCTION g_date_add_days ##### -->
434 <para>
435 Increments a date some number of days. To move forward by weeks, add
436 weeks*7 days. The date must be valid.
437 </para>
438
439 @date: a #GDate to increment
440 @n_days: number of days to move the date forward
441
442
443 <!-- ##### FUNCTION g_date_subtract_days ##### -->
444 <para>
445 Moves a date some number of days into the past. To move by weeks, just
446 move by weeks*7 days. The date must be valid.
447 </para>
448
449 @date: a #GDate to decrement
450 @n_days: number of days to move
451
452
453 <!-- ##### FUNCTION g_date_add_months ##### -->
454 <para>
455 Increments a date by some number of months. If the day of the month is
456 greater than 28, this routine may change the day of the month (because
457 the destination month may not have the current day in it). The date
458 must be valid.
459 </para>
460
461 @date: a #GDate to increment
462 @n_months: number of months to move forward
463
464
465 <!-- ##### FUNCTION g_date_subtract_months ##### -->
466 <para>
467 Moves a date some number of months into the past. If the current day of
468 the month doesn't exist in the destination month, the day of the month
469 may change. The date must be valid.
470 </para>
471
472 @date: a #GDate to decrement
473 @n_months: number of months to move
474
475
476 <!-- ##### FUNCTION g_date_add_years ##### -->
477 <para>
478 Increments a date by some number of years. If the date is February 29,
479 and the destination year is not a leap year, the date will be changed
480 to February 28. The date must be valid.
481 </para>
482
483 @date: a #GDate to increment
484 @n_years: number of years to move forward
485
486
487 <!-- ##### FUNCTION g_date_subtract_years ##### -->
488 <para>
489 Moves a date some number of years into the past. If the current day
490 doesn't exist in the destination year (i.e. it's February 29 and you
491 move to a non-leap-year) then the day is changed to February 29. The date
492 must be valid.
493 </para>
494
495 @date: a #GDate to decrement
496 @n_years: number of years to move
497
498
499 <!-- ##### FUNCTION g_date_days_between ##### -->
500 <para>
501 Computes the number of days between two dates.
502 If @date2 is prior to @date1, the returned value is negative.
503 Both dates must be valid.
504 </para>
505
506 @date1: the first date
507 @date2: the second date
508 @Returns: the number of days between @date1 and @date2
509
510
511 <!-- ##### FUNCTION g_date_compare ##### -->
512 <para>
513 qsort()-style comparsion function for dates. Both
514 dates must be valid.
515 </para>
516
517 @lhs: first date to compare
518 @rhs: second date to compare
519 @Returns: 0 for equal, less than zero if @lhs is less than @rhs,
520     greater than zero if @lhs is greater than @rhs
521
522
523 <!-- ##### FUNCTION g_date_clamp ##### -->
524 <para>
525 If @date is prior to @min_date, sets @date equal to @min_date.
526 If @date falls after @max_date, sets @date equal to @max_date.
527 Otherwise, @date is unchanged.
528 Either of @min_date and @max_date may be %NULL.  All non-%NULL dates
529 must be valid.
530 </para>
531
532 @date: a #GDate to clamp
533 @min_date: minimum accepted value for @date
534 @max_date: maximum accepted value for @date
535
536
537 <!-- ##### FUNCTION g_date_order ##### -->
538 <para>
539 Checks if @date1 is less than or equal to @date2,
540 and swap the values if this is not the case.
541 </para>
542
543 @date1: the first date
544 @date2: the second date
545
546
547 <!-- ##### FUNCTION g_date_get_day ##### -->
548 <para>
549 Returns the day of the month. The date must be valid.
550 </para>
551
552 @date: a #GDate to extract the day of the month from
553 @Returns: day of the month
554
555
556 <!-- ##### FUNCTION g_date_get_month ##### -->
557 <para>
558 Returns the month of the year. The date must be valid.
559 </para>
560
561 @date: a #GDate to get the month from
562 @Returns: month of the year as a #GDateMonth
563
564
565 <!-- ##### FUNCTION g_date_get_year ##### -->
566 <para>
567 Returns the year of a #GDate. The date must be valid.
568 </para>
569
570 @date: a #GDate
571 @Returns: year in which the date falls
572
573
574 <!-- ##### FUNCTION g_date_get_julian ##### -->
575 <para>
576 Returns the Julian day or "serial number" of the #GDate. The
577 Julian day is simply the number of days since January 1, Year 1; i.e.,
578 January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2,
579 etc. The date must be valid.
580 </para>
581
582 @date: a #GDate to extract the Julian day from
583 @Returns: Julian day
584
585
586 <!-- ##### FUNCTION g_date_get_weekday ##### -->
587 <para>
588 Returns the day of the week for a #GDate. The date must be valid.
589 </para>
590
591 @date: a #GDate.
592 @Returns: day of the week as a #GDateWeekday.
593
594
595 <!-- ##### FUNCTION g_date_get_day_of_year ##### -->
596 <para>
597 Returns the day of the year, where Jan 1 is the first day of the
598 year. The date must be valid.
599 </para>
600
601 @date: a #GDate to extract day of year from
602 @Returns: day of the year
603
604
605 <!-- ##### FUNCTION g_date_get_days_in_month ##### -->
606 <para>
607 Returns the number of days in a month, taking leap years into account.
608 </para>
609
610 @month: month
611 @year: year
612 @Returns: number of days in @month during the @year
613
614
615 <!-- ##### FUNCTION g_date_is_first_of_month ##### -->
616 <para>
617 Returns %TRUE if the date is on the first of a month. The date must be valid.
618 </para>
619
620 @date: a #GDate to check
621 @Returns: %TRUE if the date is the first of the month
622
623
624 <!-- ##### FUNCTION g_date_is_last_of_month ##### -->
625 <para>
626 Returns %TRUE if the date is the last day of the month. The date must be valid.
627 </para>
628
629 @date: a #GDate to check
630 @Returns: %TRUE if the date is the last day of the month
631
632
633 <!-- ##### FUNCTION g_date_is_leap_year ##### -->
634 <para>
635 Returns %TRUE if the year is a leap year.<footnote><para>
636 For the purposes of this function, leap year is every year divisible by
637 4 unless that year is divisible by 100. If it is divisible by 100 it would 
638 be a leap year only if that year is also divisible by 400.</para></footnote>
639 </para>
640
641 @year: year to check
642 @Returns: %TRUE if the year is a leap year
643
644
645 <!-- ##### FUNCTION g_date_get_monday_week_of_year ##### -->
646 <para>
647 Returns the week of the year, where weeks are understood to start on
648 Monday. If the date is before the first Monday of the year, return
649 0. The date must be valid.
650 </para>
651
652 @date: a #GDate
653 @Returns: week of the year
654
655
656 <!-- ##### FUNCTION g_date_get_monday_weeks_in_year ##### -->
657 <para>
658 Returns the number of weeks in the year, where weeks are taken to start
659 on Monday. Will be 52 or 53. The date must be valid. (Years always have 52
660 7-day periods, plus 1 or 2 extra days depending on whether it's a leap
661 year. This function is basically telling you how many Mondays are in
662 the year, i.e. there are 53 Mondays if one of the extra days happens
663 to be a Monday.)
664 </para>
665
666 @year: a year
667 @Returns: number of Mondays in the year
668
669
670 <!-- ##### FUNCTION g_date_get_sunday_week_of_year ##### -->
671 <para>
672 Returns the week of the year during which this date falls, if weeks 
673 are understood to being on Sunday. The date must be valid. Can return 0 if 
674 the day is before the first Sunday of the year.
675 </para>
676
677 @date: a #GDate
678 @Returns: week number
679
680
681 <!-- ##### FUNCTION g_date_get_sunday_weeks_in_year ##### -->
682 <para>
683 Returns the number of weeks in the year, where weeks are taken to start
684 on Sunday. Will be 52 or 53. The date must be valid. (Years always have 52
685 7-day periods, plus 1 or 2 extra days depending on whether it's a leap
686 year. This function is basically telling you how many Sundays are in
687 the year, i.e. there are 53 Sundays if one of the extra days happens
688 to be a Sunday.)
689 </para>
690
691 @year: year to count weeks in
692 @Returns: number of weeks
693
694
695 <!-- ##### FUNCTION g_date_get_iso8601_week_of_year ##### -->
696 <para>
697
698 </para>
699
700 @date: 
701 @Returns: 
702
703
704 <!-- ##### FUNCTION g_date_strftime ##### -->
705 <para>
706 Generates a printed representation of the date, in a 
707 <link linkend="setlocale">locale</link>-specific way. Works just like 
708 the platform's C library strftime() function, but only accepts date-related 
709 formats; time-related formats give undefined results. Date must be valid. 
710 Unlike strftime() (which uses the locale encoding), works on a UTF-8 format 
711 string and stores a UTF-8 result.
712 </para>
713
714 <para>
715 This function does not provide any conversion specifiers in addition
716 to those implemented by the platform's C library. For example, don't
717 expect that using g_date_strftime() would make the \%F provided by the C99
718 strftime() work on Windows where the C library only complies to C89.
719 </para>
720
721 @s: destination buffer
722 @slen: buffer size
723 @format: format string
724 @date: valid #GDate
725 @Returns: number of characters written to the buffer, or 0 the buffer was too small
726
727
728 <!-- ##### FUNCTION g_date_to_struct_tm ##### -->
729 <para>
730 Fills in the date-related bits of a <structname>struct tm</structname>
731 using the @date value. Initializes the non-date parts with something
732 sane but meaningless.
733 </para>
734
735 @date: a #GDate to set the <structname>struct tm</structname> from.
736 @tm: <structname>struct tm</structname> to fill.
737
738
739 <!-- ##### FUNCTION g_date_valid ##### -->
740 <para>
741 Returns %TRUE if the #GDate represents an existing day. The date must not
742 contain garbage; it should have been initialized with g_date_clear()
743 if it wasn't allocated by one of the g_date_new() variants.
744 </para>
745
746 @date: a #GDate to check
747 @Returns: Whether the date is valid
748
749
750 <!-- ##### FUNCTION g_date_valid_day ##### -->
751 <para>
752 Returns %TRUE if the day of the month is valid (a day is valid if it's
753 between 1 and 31 inclusive).
754 </para>
755
756 @day: day to check
757 @Returns: %TRUE if the day is valid
758
759
760 <!-- ##### FUNCTION g_date_valid_month ##### -->
761 <para>
762 Returns %TRUE if the month value is valid. The 12 #GDateMonth
763 enumeration values are the only valid months.
764 </para>
765
766 @month: month
767 @Returns: %TRUE if the month is valid
768
769
770 <!-- ##### FUNCTION g_date_valid_year ##### -->
771 <para>
772 Returns %TRUE if the year is valid. Any year greater than 0 is valid,
773 though there is a 16-bit limit to what #GDate will understand.
774 </para>
775
776 @year: year
777 @Returns: %TRUE if the year is valid
778
779
780 <!-- ##### FUNCTION g_date_valid_dmy ##### -->
781 <para>
782 Returns %TRUE if the day-month-year triplet forms a valid, existing day
783 in the range of days #GDate understands (Year 1 or later, no more than
784 a few thousand years in the future).
785 </para>
786
787 @day: day
788 @month: month
789 @year: year
790 @Returns: %TRUE if the date is a valid one
791
792
793 <!-- ##### FUNCTION g_date_valid_julian ##### -->
794 <para>
795 Returns %TRUE if the Julian day is valid. Anything greater than zero 
796 is basically a valid Julian, though there is a 32-bit limit.
797 </para>
798
799 @julian_date: Julian day to check
800 @Returns: %TRUE if the Julian day is valid
801
802
803 <!-- ##### FUNCTION g_date_valid_weekday ##### -->
804 <para>
805 Returns %TRUE if the weekday is valid. The seven #GDateWeekday enumeration
806 values are the only valid weekdays.
807 </para>
808
809 @weekday: weekday
810 @Returns: %TRUE if the weekday is valid
811
812