public class DataConversion extends Object
| Constructor and Description |
|---|
DataConversion() |
| Modifier and Type | Method and Description |
|---|---|
static WEEEsEndOfLifeState |
convertEoLState(String eolstate)
Convert End of Life state string to enumeration.
|
static String |
formatDate(Date date)
Format date as ISO 8601 YYYY-MM-DD, e.g.
|
static String |
formatGTIN14(long gtin)
Format GTIN code number to GTIN
String with 14 characters length. |
static Date |
readDate(String datestr)
Read date from
String expecting a ISO 8601 YYYY-MM-DD format. |
public static WEEEsEndOfLifeState convertEoLState(String eolstate)
public static String formatGTIN14(long gtin)
String with 14 characters length.gtin - The GTIN code as long integer.String with 14 characters length.public static String formatDate(Date date)
public static Date readDate(String datestr) throws IllegalArgumentException
String expecting a ISO 8601 YYYY-MM-DD format.datestr - the String date formatted as ISO 8601 YYYY-MM-DD.Date object representing the same date if no parsing
error happens.IllegalArgumentException - if any error occurs due to malformed datestr
value.Copyright © 2020. All rights reserved.