Skip to content

Commit 4a7be74

Browse files
tomas-sexeniantomas-sexenianggallotti
authored
Return 0 when doing DayOfWeek over empty date (#669)
* Return 0 when doing DoW over nulldate Issue:101248 * Consider both cases, empty date and null date --------- Co-authored-by: tomas-sexenian <tsexenian@genexus.com> Co-authored-by: Gonzalo <gonzalogallotti@gmail.com>
1 parent e9eb08b commit 4a7be74

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

common/src/main/java/com/genexus/CommonUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,6 +1833,8 @@ public static BigDecimal truncDecimal(BigDecimal num , int decimals)
18331833

18341834
public static byte dow(Date date)
18351835
{
1836+
if (date == null || date.equals(nullDate()))
1837+
return 0;
18361838
Calendar cal = getCalendar();
18371839
synchronized (cal)
18381840
{

0 commit comments

Comments
 (0)