1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00
2010-06-21 16:31:42 -05:00

264 lines
7.4 KiB
XML
Executable File

<?xml version="1.0" encoding="utf-8"?>
<Class xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file://C:/Documents%20and%20Settings/kevin.glynn/My%20Documents/CS2JLibrary/Translation.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>System.DateTime</Name>
<Imports>
<Import>java.util.Date</Import>
</Imports>
<Java>Date</Java>
<Constructors>
<Constructor>
<Params>
<Param>
<Name>year</Name>
<Type>System.Int32</Type>
</Param>
<Param>
<Name>month</Name>
<Type>System.Int32</Type>
</Param>
<Param>
<Name>day</Name>
<Type>System.Int32</Type>
</Param>
</Params>
<Imports>
<Import>java.util.GregorianCalendar</Import>
</Imports>
<Java>new GregorianCalendar(${year}, ${month}-1, ${day}).getTime()</Java>
</Constructor>
</Constructors>
<Properties>
<Property>
<Type>System.DateTime</Type>
<Name>Now</Name>
<Imports>
<Import>java.util.Calendar</Import>
</Imports>
<Get>Calendar.getInstance().getTime()</Get>
</Property>
<Property>
<Type>System.DateTime</Type>
<Name>Today</Name>
<Imports>
<Import>java.util.Date</Import>
</Imports>
<Get>new Date()</Get>
</Property>
</Properties>
<Methods>
<Method>
<Return>System.DateTime</Return>
<Name>Parse</Name>
<Params>
<Param>
<Type>System.String</Type>
<Name>s</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
</Imports>
<Java>DateTimeSupport.parse(${s})</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>Parse</Name>
<Params>
<Param>
<Type>System.String</Type>
<Name>s</Name>
</Param>
<Param>
<Type>System.IFormatProvider</Type>
<Name>provider</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
</Imports>
<Java>DateTimeSupport.parse(${s}, ${provider})</Java>
</Method>
<Method>
<Return>System.String</Return>
<Name>ToString</Name>
<Params>
<Param>
<Type>System.String</Type>
<Name>format</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.*</Import>
</Imports>
<Java>DateTimeSupport.ToString(${this}, ${format})</Java>
</Method>
<Method>
<Return>System.String</Return>
<Name>ToString</Name>
<Params>
<Param>
<Type>System.String</Type>
<Name>format</Name>
</Param>
<Param>
<Type>System.IFormatProvider</Type>
<Name>provider</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
</Imports>
<Java>DateTimeSupport.ToString(${this}, ${format}, ${provider})</Java>
</Method>
<Method>
<Return>System.String</Return>
<Name>ToString</Name>
<Params>
</Params>
<Imports>
<Import>java.text.SimpleDateFormat</Import>
</Imports>
<Java>(new SimpleDateFormat("MM/dd/yyyy HH:mm:ss a")).format(${this})</Java>
</Method>
<Method>
<Return>System.String</Return>
<Name>ToShortDateString</Name>
<Params>
</Params>
<Imports>
<Import>java.text.SimpleDateFormat</Import>
</Imports>
<Java>(new SimpleDateFormat("MM/dd/yy")).format(${this})</Java>
</Method>
<Method>
<Return>System.Int32</Return>
<Name>Compare</Name>
<Params>
<Param>
<Type>System.DateTime</Type>
<Name>t1</Name>
</Param>
<Param>
<Type>System.DateTime</Type>
<Name>t2</Name>
</Param>
</Params>
<Java>${t1}.compareTo(${t2})</Java>
</Method>
<Method>
<Return>System.Int32</Return>
<Name>CompareTo</Name>
<Params>
<Param>
<Type>System.DateTime</Type>
<Name>value</Name>
</Param>
</Params>
<Java>${this}.compareTo(${value})</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>ToUniversalTime</Name>
<Params>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTZ</Import>
<Import>java.util.TimeZone</Import>
</Imports>
<Java>(new DateTZ(${this}.getTime(), TimeZone.getTimeZone("UTC")))</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>AddMinutes</Name>
<Params>
<Param>
<Type>System.Int32</Type>
<Name>amount</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
<Import>java.util.Calendar</Import>
</Imports>
<Java>DateTimeSupport.add(${this},Calendar.MINUTE,${amount})</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>AddHours</Name>
<Params>
<Param>
<Type>System.Int32</Type>
<Name>amount</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
<Import>java.util.Calendar</Import>
</Imports>
<Java>DateTimeSupport.add(${this},Calendar.HOUR,${amount})</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>AddMilliseconds</Name>
<Params>
<Param>
<Type>System.Int32</Type>
<Name>amount</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
<Import>java.util.Calendar</Import>
</Imports>
<Java>DateTimeSupport.add(${this},Calendar.MILLISECOND,${amount})</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>AddSeconds</Name>
<Params>
<Param>
<Type>System.Int32</Type>
<Name>amount</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
<Import>java.util.Calendar</Import>
</Imports>
<Java>DateTimeSupport.add(${this},Calendar.SECOND,${amount})</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>AddDays</Name>
<Params>
<Param>
<Type>System.Int32</Type>
<Name>amount</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
<Import>java.util.Calendar</Import>
</Imports>
<Java>DateTimeSupport.add(${this},Calendar.DAY_OF_YEAR,${amount})</Java>
</Method>
<Method>
<Return>System.DateTime</Return>
<Name>AddMonths</Name>
<Params>
<Param>
<Type>System.Int32</Type>
<Name>amount</Name>
</Param>
</Params>
<Imports>
<Import>RusticiSoftware.System.DateTimeSupport</Import>
<Import>java.util.Calendar</Import>
</Imports>
<Java>DateTimeSupport.add(${this},Calendar.MONTH,${amount})</Java>
</Method>
</Methods>
</Class>