public class SgqUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static DecimalFormat |
DECIMAL_FORMAT |
protected static DateFormat |
DF_DDMMYYY |
| Constructor and Description |
|---|
SgqUtils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
daysBetween(Date date1,
Date date2)
Utility method for view to compute day between two dates.
|
static String |
formatNumber(double number)
Format a number with only 3 decimal digit.
|
static String |
formatSgqDate(Date value)
Format sgq date in dd/MM/yyyy date format.
|
static String |
getProductUnit(SgqBusinessConfig config,
Product product)
Les unités des produits sont définis par le prefix de leurs code.
|
static String |
getSHA1Hash(String... values)
Get sha1 encoding for string list
|
static boolean |
isSgqDate(String value)
Test is date is un sgq format.
|
static Date |
parseSgqDate(String value)
Parse sgq date in dd/MM/yyyy date format.
|
protected static final DateFormat DF_DDMMYYY
protected static final DecimalFormat DECIMAL_FORMAT
public static String getProductUnit(SgqBusinessConfig config, Product product)
public static Date parseSgqDate(String value) throws ParseException
value - value to parseParseExceptionpublic static boolean isSgqDate(String value)
value - value to testpublic static String formatSgqDate(Date value)
value - value to parsepublic static String getSHA1Hash(String... values)
values - public static String formatNumber(double number)
number - number to formatCopyright © 2012–2014 Herboristerie Cailleau. All rights reserved.