mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 00:08:49 +00:00
Philadelphia
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@464 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
b2ba8a1c79
commit
37a93d92c3
5 changed files with 318 additions and 2 deletions
|
@ -279,6 +279,18 @@ public final class ParserUtils
|
|||
}
|
||||
}
|
||||
|
||||
public static Date parseAmericanDate(final String str)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new SimpleDateFormat("MM/dd/yyyy").parse(str);
|
||||
}
|
||||
catch (final ParseException x)
|
||||
{
|
||||
throw new RuntimeException(x);
|
||||
}
|
||||
}
|
||||
|
||||
public static Date parseTime(final String str)
|
||||
{
|
||||
try
|
||||
|
@ -291,6 +303,18 @@ public final class ParserUtils
|
|||
}
|
||||
}
|
||||
|
||||
public static Date parseAmericanTime(final String str)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new SimpleDateFormat("h:mm a").parse(str);
|
||||
}
|
||||
catch (final ParseException x)
|
||||
{
|
||||
throw new RuntimeException(x);
|
||||
}
|
||||
}
|
||||
|
||||
public static Date joinDateTime(final Date date, final Date time)
|
||||
{
|
||||
final Calendar cDate = new GregorianCalendar();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue