Libical API Documentation 3.0

astime.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1986-2000, Hiram Clawson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or
6 * without modification, are permitted provided that the following
7 * conditions are met:
8 *
9 * Redistributions of source code must retain the above
10 * copyright notice, this list of conditions and the
11 * following disclaimer.
12 *
13 * Redistributions in binary form must reproduce the
14 * above copyright notice, this list of conditions and
15 * the following disclaimer in the documentation and/or
16 * other materials provided with the distribution.
17 *
18 * Neither name of The Museum of Hiram nor the names of
19 * its contributors may be used to endorse or promote products
20 * derived from this software without specific prior
21 * written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
24 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 * IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
28 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
33 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
34 * THE POSSIBILITY OF SUCH DAMAGE.
35 */
36
42#ifndef ICAL_ASTIME_H
43#define ICAL_ASTIME_H
44
45#include "libical_ical_export.h"
46
47 typedef struct ut_instant
48{
49 double j_date;
50 long year;
51 int month;
52 int day;
53 int i_hour;
54 int i_minute;
55 int i_second;
56 double d_hour;
57 double d_minute;
58 double d_second;
59 int weekday;
60 int day_of_year;
61} UTinstant, *UTinstantPtr;
62
63/* Functions in caldate.c */
64
66LIBICAL_ICAL_EXPORT long caldat(UTinstantPtr);
67
69LIBICAL_ICAL_EXPORT double juldat(UTinstantPtr);
70
71#endif
caldat
long caldat(UTinstantPtr)
Converts Julian date to year,mo,da.
juldat
double juldat(UTinstantPtr)
Returns Julian day from year,mo,da.
ut_instant
Definition: astime.h:48
ut_instant::month
int month
Definition: astime.h:51
ut_instant::day
int day
Definition: astime.h:52
ut_instant::weekday
int weekday
Definition: astime.h:59
ut_instant::day_of_year
int day_of_year
Definition: astime.h:60
ut_instant::d_hour
double d_hour
Definition: astime.h:56
ut_instant::year
long year
Definition: astime.h:50
ut_instant::d_second
double d_second
Definition: astime.h:58
ut_instant::i_minute
int i_minute
Definition: astime.h:54
ut_instant::d_minute
double d_minute
Definition: astime.h:57
ut_instant::j_date
double j_date
Definition: astime.h:49
ut_instant::i_hour
int i_hour
Definition: astime.h:53
ut_instant::i_second
int i_second
Definition: astime.h:55