Subversion Repositories SmartDukaan

Rev

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

Rev 21792 Rev 21986
Line 37... Line 37...
37
	public static final LocalDateTime toDateTime(long epocTime){
37
	public static final LocalDateTime toDateTime(long epocTime){
38
		return Instant.ofEpochMilli(epocTime).atZone(ZoneId.systemDefault()).toLocalDateTime();
38
		return Instant.ofEpochMilli(epocTime).atZone(ZoneId.systemDefault()).toLocalDateTime();
39
	}
39
	}
40
	
40
	
41
	public static final LocalDateTime toDateTime(String dateTimeString) throws DateTimeParseException{
41
	public static final LocalDateTime toDateTime(String dateTimeString) throws DateTimeParseException{
42
		if(dateTimeString == null){
42
		if(dateTimeString == null || dateTimeString.equals("0")){
43
			return null;
43
			return null;
44
		}
44
		}
-
 
45
		LocalDateTime date =
45
		return LocalDateTime.parse(dateTimeString);
46
				  Instant.ofEpochMilli(Long.valueOf(dateTimeString))
-
 
47
				  .atZone(ZoneId.systemDefault())
-
 
48
				  .toLocalDateTime();
-
 
49
		return date;
46
	}
50
	}
47
 
51
 
48
	public static boolean isValidMobile(String mobile){
52
	public static boolean isValidMobile(String mobile){
49
		try{
53
		try{
50
			Long.valueOf(mobile);
54
			Long.valueOf(mobile);