my problem is with RegularTimePeriod…
i have the date in the datebase saved as Date type
i’m trying to retrieve them and process them through RegularTimePeriod but it keeps giving me null…
the code is
RegularTimePeriod t = new Day();
t = t.createInstance(Date.class, resultado.getData(), TimeZone.getDefault());
but i’m always getting it as empty value when i debug it, can anyone tell me a way to get it work please.
Take a look at the source code of this function
it expects subclass of
RegularTimePeriod, but you use it withDatewhich is not what required.I assume you should do something like
t = t.createInstance(Day.class, resultado.getData(), TimeZone.getDefault());