Subversion Repositories SmartDukaan

Rev

Rev 31044 | Rev 31460 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31044 Rev 31177
Line 37... Line 37...
37
 
37
 
38
	public static String getYearMonth(LocalDateTime dateTime) {
38
	public static String getYearMonth(LocalDateTime dateTime) {
39
		return dateTime.format(ymFormatter);
39
		return dateTime.format(ymFormatter);
40
	}
40
	}
41
 
41
 
42
 
-
 
43
	public static String formatYearMonth(LocalDateTime dateTime) {
42
	public static String formatYearMonth(LocalDateTime dateTime) {
44
		return dateTime.format(monYYYYFormatter);
43
		return dateTime.format(monYYYYFormatter);
45
	}
44
	}
46
 
45
 
47
	public static String formatToYMD(LocalDateTime dateTime) {
46
	public static String formatToYMD(LocalDateTime dateTime) {
Line 103... Line 102...
103
	public static String formatDDMMMyyyyFormatter(LocalDate localDate) {
102
	public static String formatDDMMMyyyyFormatter(LocalDate localDate) {
104
		return localDate.format(ddMMMyyyyHypenatedFormatter);
103
		return localDate.format(ddMMMyyyyHypenatedFormatter);
105
	}
104
	}
106
 
105
 
107
	public static String formatReporitcoDate(LocalDateTime dateTime) {
106
	public static String formatReporitcoDate(LocalDateTime dateTime) {
108
		if (dateTime == null) return "-";
107
		if (dateTime == null)
-
 
108
			return "-";
109
		return dateTime.format(reporticoFormatter);
109
		return dateTime.format(reporticoFormatter);
110
	}
110
	}
111
 
111
 
112
	public static String formatDateTime(LocalDateTime dateTime) {
112
	public static String formatDateTime(LocalDateTime dateTime) {
113
		if (dateTime == null)
113
		if (dateTime == null)
Line 118... Line 118...
118
	public static double serialize(double value) throws IOException {
118
	public static double serialize(double value) throws IOException {
119
		BigDecimal bd = new BigDecimal(value);
119
		BigDecimal bd = new BigDecimal(value);
120
		bd = bd.setScale(2, RoundingMode.HALF_UP);
120
		bd = bd.setScale(2, RoundingMode.HALF_UP);
121
		return bd.doubleValue();
121
		return bd.doubleValue();
122
	}
122
	}
-
 
123
 
-
 
124
	public static double serialize(BigDecimal value) {
-
 
125
		value = value.setScale(2, RoundingMode.HALF_UP);
-
 
126
		return value.doubleValue();
-
 
127
	}
123
}
128
}