mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Add LocalDate to LocalDate
This commit is contained in:
@ -198,6 +198,10 @@ public class ValueUtils
|
|||||||
{
|
{
|
||||||
return (null);
|
return (null);
|
||||||
}
|
}
|
||||||
|
else if(value instanceof LocalDate ld)
|
||||||
|
{
|
||||||
|
return (ld);
|
||||||
|
}
|
||||||
else if(value instanceof java.sql.Date d)
|
else if(value instanceof java.sql.Date d)
|
||||||
{
|
{
|
||||||
return d.toLocalDate();
|
return d.toLocalDate();
|
||||||
@ -227,12 +231,12 @@ public class ValueUtils
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw (new IllegalArgumentException("Unsupported class " + value.getClass().getName() + " for converting to BigDecimal."));
|
throw (new IllegalArgumentException("Unsupported class " + value.getClass().getName() + " for converting to LocalDate."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
throw (new QValueException("Value [" + value + "] could not be converted to an BigDecimal.", e));
|
throw (new QValueException("Value [" + value + "] could not be converted to an LocalDate.", e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user