]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | package com.easysw.cups; |
2 | /** | |
3 | * @version 1.00 06-NOV-2002 | |
bc44d920 | 4 | * @author Apple Inc. |
ef416fc2 | 5 | * |
6 | * Internet Printing Protocol definitions for the Common UNIX Printing | |
7 | * System (CUPS). | |
8 | * | |
bc44d920 | 9 | * Copyright 2007 by Apple Inc. |
ef416fc2 | 10 | * Copyright 1997-2002 by Easy Software Products. |
11 | * | |
12 | * These coded instructions, statements, and computer programs are the | |
bc44d920 | 13 | * property of Apple Inc. and are protected by Federal copyright |
14 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
15 | * which should have been included with this file. If this file is | |
16 | * file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 17 | */ |
18 | ||
19 | /** | |
20 | * An <code>IPPCalendar</code> object is used for date/time conversion. | |
21 | * | |
22 | * @author TDB | |
23 | * @version 1.0 | |
24 | * @since JDK1.3 | |
25 | */ | |
26 | ||
27 | import java.util.*; | |
28 | ||
29 | class IPPCalendar extends GregorianCalendar | |
30 | { | |
31 | /** | |
32 | * Get the time in milliseconds from the <code>GregorianCalendar</code> | |
33 | * class. | |
34 | * | |
35 | * @return <code>long</code> Time in milliseconds of a date. | |
36 | */ | |
37 | public long getTimeInMillis() | |
38 | { | |
39 | return(super.getTimeInMillis()); | |
40 | } | |
41 | ||
42 | /** | |
43 | * Get the unix time in seconds from the <code>GregorianCalendar</code> | |
44 | * class. | |
45 | * | |
46 | * @return <code>int</code> Unix Time in seconds of a date. | |
47 | */ | |
48 | public int getUnixTime() | |
49 | { | |
50 | return( (int)(getTimeInMillis() / 1000) ); | |
51 | } | |
52 | ||
53 | } // end of class |