IBM Support

com.yantra.yfc.util.YFCDate is not fully documented in javadoc

Troubleshooting


Problem

com.yantra.yfc.util.YFCDate is not fully documented in javadoc

Symptom

PART: Documentation 5.0 SP2 Platform
PRODUCT: Distributed Order Management
COMPONENT: Analytics
WEB BROWSER: Internet Explorer - 6.0 sp1

com.yantra.yfc.util.YFCDate is not fully documented in javadoc

Cause

Resolving The Problem

Fields:
public static String APP_FORMAT = "yyyyMMddHHmmss";
/* Date format used when locale is not known, mostly when coding and you dont case for Locale */

public static String XML_DATE_FORMAT = "yyyyMMdd'T'HH:mm:ss";
/* Date format used in XMLs both input and output in the application */

public static String SMALL_XML_DATE_FORMAT = "yyyyMMdd";
/* Date format used in XMLs both input and output in the application */

public static YFCDate LOW_DATE = new YFCDate("19000101000000");
/* Low Date -special date to signify situations when date is in the past and unknown */

public static YFCDate HIGH_DATE = new YFCDate("25000101000000");
/* Low Date -special date to signify situations when date is in the future and unknown */

Constructors:
YFCDate()
/* gets the current date from System object */

YFCDate(boolean ignoreTime)
/* gets the current date from system, then changes Hour, Minute, Second and Millisecond to zero */

YFCDate(String aStrDate,YFCLocale aLocale)
/* Tries to parse the String sStrDate in the locale specified in yantra (YFCLocale object), if possible, returns the aStrDate in the format of the YFCLocale, else returns current date */

YFCDate(String aStrDate,YFCLocale aLocale,boolean ignoreTime)
/* Tries to parse the String sStrDate in the locale specified in yantra (YFCLocale object), if possible, returns the aStrDate in the format of the YFCLocale, else returns current date, finally strips the time component - makes it zero - if ignoreTime=true */

YFCDate(String aStrDate)
/* Tries to parse sStrDate in this format - yyyyMMddHHmmss. and returns the YFCDate.. Faithfully puts in time component */

YFCDate(String aStrDate, String inFormat, boolean ignoreTime)
/* Tries to parse sStrDate in this format - yyyyMMddHHmmss. and returns the YFCDate.. Strips time component if ignoreTime=true specified */

YFCDate(Date aDate)
/* converts a Date object to a YFCDate object, faithfully includes time */

YFCDate(long aMillis)
/* converts a TimeStamp object to YFCDate...
- milliseconds since January 1, 1970, 00:00:00 GMT. A negative number is the number of milliseconds before January 1, 1970, 00:00:00 GMT.
*/

YFCDate(long aMillis,boolean ignoreTime)
/* converts a java.sql.TimeStamp object to YFCDate... btw, YFCDate extends java.sql.TimeStamp
- milliseconds since January 1, 1970, 00:00:00 GMT. A negative number is the number of milliseconds before January 1, 1970, 00:00:00 GMT.
Strips time component if ignoreTime=true specified
*/

YFCDate(Date aDate,boolean ignoreTime)
/* converts a Date object to a YFCDate object, strips time if ignoreTime=true specified */

Methods:
void applyTimeZone(TimeZone fromTz, TimeZone toTz)
/* Assumes YFCDate object to be in the from TimeZone, and converts it to the toTimeZone, basically adds or subtracts a few hours */

void changeDate(int aDays)
/* adds number of aDays to YFCDate */

int diffDays(YFCDate t2)
/* gives difference in days without considering the time portions of the date. */

boolean equals(YFCDate other)
/* true if both YFCDate objects point exactly to the same physical date */

java.lang.String getDateString(YFCLocale aLocale)
/* runs getString on the YFCLocale object
Will return something like the string "yyyyMMDD" as it has been setup in Yantra
*/

java.lang.String getDateTimeString(YFCLocale aLocale)
/* runs getString on the YFCLocale object
Will return something like the string "yyyyMMDDThh:mm:ss" as it has been setup in Yantra
for this YFCLocale
*/

int getDayOfMonth()
/* Returns the day of the month represented by this YFCDate. */

int getDayOfWeek()
/* Returns the Day of the week represented by this YFCDate. */

int getFourDigitYear()
/* gets the year something like 2004.. as an int */

int getMonth()
/* Returns a int number representing the month represented by this YFCDate object.
0 for January and 11 For December
*/

YFCDate getNewDate(int aDays)
/* returns a new YFCDate object after changing the input by supplied number of days.
Leaves *this* unchanged
*/

java.lang.String getString()
/* returns YFCDate in this format : "yyyyMMdd'T'HH:mm:ss" */

java.lang.String getString(java.lang.String aOutFormat)
/* returns YFCDate in the specified format */

java.lang.String getString(java.lang.String aOutFormat, java.util.Locale aLcl)
/* uses

java.lang.String getString(YFCLocale aLocale, boolean withTime)
/* returns date and time as specified in the YFCLocale, with or without the Time part */

static YFCDate getYFCDate(java.lang.String aStr)
/* creates a static YFCObject object from a string - representing the date
*/

boolean gt(YFCDate t2, boolean ignoreTime)
/* if t1 > t2 return true. ignore Time if so specified */
boolean gte(YFCDate t2, boolean ignoreTime)
/* if t1 >= t2 return true. ignore Time if so specified */
boolean lt(YFCDate t2, boolean ignoreTime)
/* if t1 < t2 return true. ignore Time if so specified*/<br>boolean lte(YFCDate t2, boolean ignoreTime) <br>/* if t1 <= t2 return true. ignore Time if so specified */<br><br><br>static void main(java.lang.String[] args) <br>/* Not quite sure why this is here.. it exercises a few methods of the YFCDate, takes no arguments.<br>You can try it out, but obviously cant use it in your code <br>Probably written for testing purposes*/<br><br>void removeTimeComponent() <br>/* makes time part 0 */<br><br>void setBeginOfDay() <br>/* makes time part 0 - exactly same as removeTimeComponent */<br><br>void setDate(java.lang.String longValue, boolean ignoreTime) <br>/* changes *this* to be equal to the date specified in longValue <br>longValue is a String, but it tries to parse it to long int */<br><br>void setDate(java.lang.String aStrDate, java.lang.String inFormat, boolean ignoreTime) <br>/* Tries to parse aStrDate to Date object using the inFormat, then updates *this* */<br><br>void setDate(YFCDate aDate) <br>/* Uses Date object to set Date in YFCDate */<br><br>void setDate(YFCDate aDate, boolean ignoreTime) <br>/* Uses YFCDate object to set Date in YFCDate .. strips time if ignoreTime=true */<br><br>void setEndOfDay() <br>/* Changes time part of the YFCDate to be hour = 23, minutes = 59 and seconds = 59 <br>leaves milliseconds intact<br>*/<br><br>java.lang.String toString() <br>/* Simply returns *this* in string type, in the "yyyyMMddHHmmss" format */<br>

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

PRI49394

Product Synonym

[<p><b>]Fact[</b><p>];

Document Information

Modified date:
16 June 2018

UID

swg21534121