|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Libraries.StdLibrary
com.planet_ink.coffee_mud.Libraries.CoffeeTime
public class CoffeeTime
| Field Summary | |
|---|---|
protected TimeClock |
globalClock
|
| Fields inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
|---|
isDebugging, name, serviceClient, tickStatus |
| Fields inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.TimeManager |
|---|
MILI_DAY, MILI_HOUR, MILI_MINUTE, MILI_MONTH, MILI_SECOND, MILI_WEEK, MILI_YEAR, MONTHS, SHORTMONTHS |
| Constructor Summary | |
|---|---|
CoffeeTime()
|
|
| Method Summary | |
|---|---|
java.lang.String |
convertHour(java.lang.String hours24)
Returns the regular Hours given the hours in the international format (military time) Usage: ConvertHour(GetIn(req, "ENDHR")) |
java.lang.String |
date2AMPMString(java.util.Calendar C)
|
java.lang.String |
date2AMPMString(long time)
Returns the Minutes portion of a given Time Usage: String ST_AMPM=date2AMPMString(time); |
java.lang.String |
date2APTimeString(long time)
Return the time in HH:MM AP format. |
java.lang.String |
date2BestShortEllapsedTime(long t)
Picks the single best representation of the given ellapsed time, from seconds to minutes to hours to days, and returns the correct amount along with the single letter suffix |
java.lang.String |
date2BriefString(long time)
Returns time in HH:MMap format, unless the day is other than today, in which case it prepends yy/m/d. |
java.lang.String |
date2Date2String(long time)
Converts a given date into a string of form: MM/DD/YY Usage: date2Date2String(time) |
java.lang.String |
date2DateString(long time)
Converts a given date into a string of form: MM/DD/YYYY Usage: date2DateString(time) |
java.lang.String |
date2DayOfMonthString(long time)
Returns the DD portion of a given date Usage: String ENDDD=date2DayOfMonthString(); |
java.lang.String |
date2EllapsedTime(long time,
java.util.concurrent.TimeUnit minUnit,
boolean shortest)
Converts a given number of milliseconds, into a number of rl years, months, days, hours, minutes, and seconds. |
java.lang.String |
date2HRString(java.util.Calendar C)
|
java.lang.String |
date2HRString(long time)
Returns the Hours portion of a given Time Usage: String ENDHR=date2HRString(); |
java.lang.String |
date2MINString(java.util.Calendar C)
|
java.lang.String |
date2MINString(long time)
Returns the Minutes portion of a given Time Usage: String ENDMIN=date2MINString(); |
java.lang.String |
date2MonthDateString(long time,
boolean shortName)
Returns the month/day for a given date Usage: String ENDMM=date2MonthDateString(); |
java.lang.String |
date2MonthString(long time,
boolean shortName)
Returns the month for a given date Usage: String ENDMM=date2MonthString(time,true); |
java.lang.String |
date2SecondsString(long time)
Converts a given date into a string of form: MM/DD/YYYY HH:MM AP Usage: date2SecondsString(time) |
java.lang.String |
date2SmartEllapsedTime(long time,
boolean shortest)
Converts a given number of milliseconds, into a number of rl years, months, days, hours, minutes, and seconds. |
java.lang.String |
date2String(java.util.Calendar C)
Converts a given date into a string of form: MM/DD/YYYY HH:MM AP Usage: date2String() |
java.lang.String |
date2String(long time)
Converts a given date into a string of form: MM/DD/YYYY HH:MM AP Usage: date2String(time) |
java.lang.String |
date2YYYYString(long time)
Returns the YYYY portion of a given date Returns the DD portion of a given date Usage: String ENDYYYY=date2YYYYString(); |
java.lang.String |
date2ZoneString(long time)
Returns the time zone of the server Usage: MEETZN = T2ZoneString(); |
java.lang.String |
getAMPM(java.lang.String TheHour)
Returns the AMPM stamp given the international Hours portion the Time Usage: getAMPM(GetIn(req, "ENDHR")) |
java.lang.String |
getMonthName(int number,
boolean giveShort)
Return the name of the month, given a number Usage: String Mnth=getMonthName(m,GiveShort).charStats(); |
java.lang.String |
getTheIntZoneID(int theRawOffset)
Get the zone id given the timezone string Usage: GetTheZoneID(MeetTZ.getRawOffset())+"\n"; |
java.lang.String |
getTheTimeZone(java.lang.String theID)
Returns the time zone of the given ID Usage: MEETZN = GetTheTimeZone(ID); |
TimeClock |
globalClock()
Returns the mud wide global time clock object as defined by the coffeemud.ini file. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
boolean |
isTickExpression(java.lang.String val)
Parses whether a tick expression, or an expression ending with the word minutes, hours, seconds, days, mudhours, muddays, mudweeks, mudmonths, or mudyears |
boolean |
isValidDateString(java.lang.String dateTimeStr)
Returns whether the given string would parse to a valid date. |
TimeClock |
localClock(Physical P)
Returns the most local clock for the given object. |
java.lang.String |
month2MM(java.lang.String monthName)
Returns the numeric representation of the month Usage: month2MM("January"); |
int |
parseTickExpression(java.lang.String val)
Parses either a tick expression, or an expression ending with the word minutes, hours, seconds, days, mudhours, muddays, mudweeks, mudmonths, or mudyears |
java.lang.String |
smtpDateFormat(long time)
format the date for an smtp message Usage: smtpDateFormat(98374987234) |
java.util.Calendar |
string2Date(java.lang.String dateTimeStr)
Converts a string of some form into a Calendar object. |
long |
string2Millis(java.lang.String dateTimeStr)
Converts a string of some form into a Calendar object. |
java.lang.String |
twoDigits(long num)
Converts a number to two digits. |
| Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
|---|
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary |
|---|
activate, getServiceClient, L, propertiesLoaded, shutdown |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, initializeClass, name, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
protected TimeClock globalClock
| Constructor Detail |
|---|
public CoffeeTime()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectID in class StdLibrarypublic java.lang.String month2MM(java.lang.String monthName)
TimeManager
month2MM in interface TimeManagermonthName - The month name
public java.lang.String getMonthName(int number,
boolean giveShort)
TimeManager
getMonthName in interface TimeManagernumber - Month number to convertgiveShort - Give abbreviation if true
public long string2Millis(java.lang.String dateTimeStr)
TimeManager
string2Millis in interface TimeManagerdateTimeStr - The string to retrieve from
public java.util.Calendar string2Date(java.lang.String dateTimeStr)
TimeManager
string2Date in interface TimeManagerdateTimeStr - The string to retrieve from
public boolean isValidDateString(java.lang.String dateTimeStr)
TimeManager
isValidDateString in interface TimeManagerdateTimeStr - the strong to parse
public java.lang.String convertHour(java.lang.String hours24)
TimeManager
convertHour in interface TimeManagerhours24 - Hours in military format
public java.lang.String getAMPM(java.lang.String TheHour)
TimeManager
getAMPM in interface TimeManagerTheHour - Hours in military format
public java.lang.String getTheIntZoneID(int theRawOffset)
TimeManager
getTheIntZoneID in interface TimeManagertheRawOffset - The time zone's raw offset to convert
public java.lang.String getTheTimeZone(java.lang.String theID)
TimeManager
getTheTimeZone in interface TimeManagertheID - The ID of the abbreviated time zone.
public java.lang.String date2MonthString(long time,
boolean shortName)
TimeManager
date2MonthString in interface TimeManagertime - The time in milisecondsshortName - true to use shortened months
public java.lang.String date2MonthDateString(long time,
boolean shortName)
TimeManager
date2MonthDateString in interface TimeManagertime - The time in milisecondsshortName - true to use shortened months
public java.lang.String date2DayOfMonthString(long time)
TimeManager
date2DayOfMonthString in interface TimeManagertime - The time in miliseconds
public java.lang.String twoDigits(long num)
TimeManager
twoDigits in interface TimeManagernum - the number
public java.lang.String date2YYYYString(long time)
TimeManager
date2YYYYString in interface TimeManagertime - The time in miliseconds
public java.lang.String date2HRString(long time)
TimeManager
date2HRString in interface TimeManagertime - time used
public java.lang.String date2MINString(long time)
TimeManager
date2MINString in interface TimeManagertime - The time in miliseconds
public java.lang.String date2HRString(java.util.Calendar C)
public java.lang.String date2MINString(java.util.Calendar C)
public java.lang.String date2ZoneString(long time)
TimeManager
date2ZoneString in interface TimeManagertime - The time in miliseconds
public java.lang.String date2AMPMString(long time)
TimeManager
date2AMPMString in interface TimeManagertime - The time in miliseconds
public java.lang.String date2AMPMString(java.util.Calendar C)
public java.lang.String date2APTimeString(long time)
TimeManager
date2APTimeString in interface TimeManagertime - the time in millis
public java.lang.String date2BriefString(long time)
TimeManager
date2BriefString in interface TimeManagertime - The time in miliseconds
public java.lang.String date2String(java.util.Calendar C)
TimeManager
date2String in interface TimeManagerC - The time in calendar
public java.lang.String date2String(long time)
TimeManager
date2String in interface TimeManagertime - The time in miliseconds
public java.lang.String date2EllapsedTime(long time,
java.util.concurrent.TimeUnit minUnit,
boolean shortest)
TimeManager
date2EllapsedTime in interface TimeManagertime - The time in milisecondsminUnit - The smallest unit to round down toshortest - true for short form, false otherwise
public java.lang.String date2BestShortEllapsedTime(long t)
TimeManager
date2BestShortEllapsedTime in interface TimeManagert - time in milliseconds
public java.lang.String date2SmartEllapsedTime(long time,
boolean shortest)
TimeManager
date2SmartEllapsedTime in interface TimeManagertime - The time in milisecondsshortest - true for short form, false otherwise
public java.lang.String date2SecondsString(long time)
TimeManager
date2SecondsString in interface TimeManagertime - The time in miliseconds
public java.lang.String date2DateString(long time)
TimeManager
date2DateString in interface TimeManagertime - The time in miliseconds
public java.lang.String date2Date2String(long time)
TimeManager
date2Date2String in interface TimeManagertime - The time in miliseconds
public java.lang.String smtpDateFormat(long time)
TimeManager
smtpDateFormat in interface TimeManagertime - The time in miliseconds
public TimeClock globalClock()
TimeManager
globalClock in interface TimeManagerTimeClockpublic boolean isTickExpression(java.lang.String val)
TimeManager
isTickExpression in interface TimeManagerval - the expression
public int parseTickExpression(java.lang.String val)
TimeManager
parseTickExpression in interface TimeManagerval - the expression
public TimeClock localClock(Physical P)
TimeManager
localClock in interface TimeManagerP - an item, room, mob, whatever.
TimeClock
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||