KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > functions > DateTimeConstructor


1 package net.sf.saxon.functions;
2 import net.sf.saxon.expr.XPathContext;
3 import net.sf.saxon.om.Item;
4 import net.sf.saxon.trans.XPathException;
5 import net.sf.saxon.value.DateTimeValue;
6 import net.sf.saxon.value.DateValue;
7 import net.sf.saxon.value.TimeValue;
8
9
10 /**
11 * This class supports the dateTime($date, $time) function
12 */

13
14 public class DateTimeConstructor extends SystemFunction {
15
16     /**
17     * Evaluate the expression
18     */

19
20     public Item evaluateItem(XPathContext context) throws XPathException {
21         DateValue arg0 = (DateValue)argument[0].evaluateItem(context);
22         TimeValue arg1 = (TimeValue)argument[1].evaluateItem(context);
23         return new DateTimeValue(arg0, arg1);
24     }
25
26 }
27
28
29
30
31
32 //
33
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
34
// you may not use this file except in compliance with the License. You may obtain a copy of the
35
// License at http://www.mozilla.org/MPL/
36
//
37
// Software distributed under the License is distributed on an "AS IS" basis,
38
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
39
// See the License for the specific language governing rights and limitations under the License.
40
//
41
// The Original Code is: all this file.
42
//
43
// The Initial Developer of the Original Code is Michael H. Kay
44
//
45
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
46
//
47
// Contributor(s): none.
48
//
49
Popular Tags