Subversion Repositories SmartDukaan

Rev

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

Rev 30219 Rev 30289
Line 1... Line 1...
1
package com.spice.profitmandi.common.util;
1
package com.spice.profitmandi.common.util;
2
 
2
 
-
 
3
import java.io.IOException;
-
 
4
import java.math.BigDecimal;
3
import java.math.RoundingMode;
5
import java.math.RoundingMode;
4
import java.text.NumberFormat;
6
import java.text.NumberFormat;
5
import java.time.LocalDateTime;
7
import java.time.LocalDateTime;
6
import java.time.format.DateTimeFormatter;
8
import java.time.format.DateTimeFormatter;
7
import java.util.Locale;
9
import java.util.Locale;
Line 99... Line 101...
99
	public static String formatDateTime(LocalDateTime dateTime) {
101
	public static String formatDateTime(LocalDateTime dateTime) {
100
		if (dateTime == null)
102
		if (dateTime == null)
101
			return "-";
103
			return "-";
102
		return dateTime.format(yyMMDDTimeFormatter);
104
		return dateTime.format(yyMMDDTimeFormatter);
103
	}
105
	}
-
 
106
 
-
 
107
	public static double serialize(double value) throws IOException {
-
 
108
		BigDecimal bd = new BigDecimal(value);
-
 
109
		bd = bd.setScale(2, RoundingMode.HALF_UP);
-
 
110
		return bd.doubleValue();
-
 
111
	}
104
}
112
}