public class JS4JUtils extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
s_iDayMilliseconds |
static int |
s_iHourMilliseconds |
static int |
s_iMinuteMilliseconds |
| Constructor and Description |
|---|
JS4JUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
convertTimeZoneToMilliseconds(String strTimeZone)
Converts a timezone of the format +/-hhmm to milliseconds
|
static String |
padRight(int iIn,
int iWidth,
char cPad)
Helper method to create strings of the form "nn000".
|
static String |
padRight(long lIn,
int iWidth,
char cPad)
Helper method to create strings of the form "nn000".
|
static String |
padRight(String strInput,
int iMax,
char cPadChar)
Creates a new String padded on its right side with the supplied pad
character guaranteed to be the supplied length.
|
public static final int s_iDayMilliseconds
public static final int s_iHourMilliseconds
public static final int s_iMinuteMilliseconds
public static int convertTimeZoneToMilliseconds(String strTimeZone)
strTimeZone - timezone offset from Greenwich Mean Time (GMT) for example
"-0500" is Eastern Standard Time, "-0400" is Eastern Daylight
Time, "+0000" is Greenwich Mean Time, and "+0100" is the offset
for Europe/Paris.public static String padRight(long lIn, int iWidth, char cPad)
lIn - long value to be right justified with leading characters in
the returned String.iWidth - integer value of the width of the returned String.cPad - character value to be used to pad the right portion of the
returned String to make it as wide as the specified iWidth
parameter. For example, calling toRightPaddedString(iNum,4,'0')
would result in "4500" if iNum == 45, or "4000" if iNum == 4.public static String padRight(int iIn, int iWidth, char cPad)
iIn - integer value to be right justified with leading characters in
the returned String.iWidth - integer value of the width of the returned String.cPad - character value to be used to pad the right portion of the
returned String to make it as wide as the specified iWidth
parameter. For example, calling toRightPaddedString(iNum,4,'0')
would result in "4500" if iNum == 45, or "4000" if iNum == 4.public static String padRight(String strInput, int iMax, char cPadChar)
strInput - iMax - cPadChar - Copyright © 2022. All rights reserved.