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