-
-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
Description
Consider adding a class TemporalFactories (name TBD). It would have factory methods for all temporal classes across java.time and ThreeTen-Extra. The crucial difference would be that such a class would be designed for static imports:
public class TemporalFactories {
public LocalDate date(int,int,int);
public LocalDate date(int,Month,int);
public LocalDate date(int,MonthDay);
public LocalDate date(int,int);
public LocalDate date(Year,int,int);
public LocalDate date(Year,Month,int);
public LocalDate date(Year,MonthDay);
public LocalDate date(Year,int);
public LocalDate date(String); // parse
// and so on for other types
}
// usage
callMethod(date(2020, 6, 12));
Originally suggested in #155