| Line 30... |
Line 30... |
| 30 |
private static final DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("dd-MM-yyyy");
|
30 |
private static final DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("dd-MM-yyyy");
|
| 31 |
private static final DateTimeFormatter ddMMMyyyyHypenatedFormatter = DateTimeFormatter.ofPattern("dd-MMM-yyyy");
|
31 |
private static final DateTimeFormatter ddMMMyyyyHypenatedFormatter = DateTimeFormatter.ofPattern("dd-MMM-yyyy");
|
| 32 |
private static final DateTimeFormatter dateMonthFormatter = DateTimeFormatter.ofPattern("MMM-dd");
|
32 |
private static final DateTimeFormatter dateMonthFormatter = DateTimeFormatter.ofPattern("MMM-dd");
|
| 33 |
private static final DateTimeFormatter dateMonthFormatterNonHyphenated = DateTimeFormatter.ofPattern("MMM dd");
|
33 |
private static final DateTimeFormatter dateMonthFormatterNonHyphenated = DateTimeFormatter.ofPattern("MMM dd");
|
| 34 |
private static final DateTimeFormatter reporticoFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
34 |
private static final DateTimeFormatter reporticoFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
| - |
|
35 |
private static final DateTimeFormatter nicDateFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
|
| 35 |
//rkb
|
36 |
//rkb
|
| 36 |
public static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss");
|
37 |
public static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss");
|
| 37 |
private static final DateTimeFormatter ymFormatter = DateTimeFormatter.ofPattern("yyyyMM");
|
38 |
private static final DateTimeFormatter ymFormatter = DateTimeFormatter.ofPattern("yyyyMM");
|
| 38 |
private static final DateTimeFormatter ymdFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
39 |
private static final DateTimeFormatter ymdFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
| 39 |
private static final DateTimeFormatter monYYYYFormatter = DateTimeFormatter.ofPattern("MMM, yyyy");
|
40 |
private static final DateTimeFormatter monYYYYFormatter = DateTimeFormatter.ofPattern("MMM, yyyy");
|
| Line 113... |
Line 114... |
| 113 |
|
114 |
|
| 114 |
public static String formatDDMMMyyyyFormatter(LocalDate localDate) {
|
115 |
public static String formatDDMMMyyyyFormatter(LocalDate localDate) {
|
| 115 |
return localDate.format(ddMMMyyyyHypenatedFormatter);
|
116 |
return localDate.format(ddMMMyyyyHypenatedFormatter);
|
| 116 |
}
|
117 |
}
|
| 117 |
|
118 |
|
| - |
|
119 |
// NIC/IRP e-invoice date fields (DocDt, PrecDoc InvDt) require an exact 10-char dd/MM/yyyy string.
|
| - |
|
120 |
public static String formatNicDate(LocalDate localDate) {
|
| - |
|
121 |
return localDate.format(nicDateFormatter);
|
| - |
|
122 |
}
|
| - |
|
123 |
|
| 118 |
public static String formatReporitcoDate(LocalDateTime dateTime) {
|
124 |
public static String formatReporitcoDate(LocalDateTime dateTime) {
|
| 119 |
if (dateTime == null)
|
125 |
if (dateTime == null)
|
| 120 |
return "-";
|
126 |
return "-";
|
| 121 |
return dateTime.format(reporticoFormatter);
|
127 |
return dateTime.format(reporticoFormatter);
|
| 122 |
}
|
128 |
}
|