SHARE
TWEET

Untitled

a guest Apr 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Service
  2. public class DayOfWeekResolverServiceImpl implements DayOfWeekResolverService
  3. {
  4.   @Override
  5.   public String determineDayOfWeek(int year, int month, int dayOfMonth)
  6.   {
  7.     LocalDate resolvedLocalDate = LocalDate.of(year, month, dayOfMonth);
  8.     return convertToDayOfWeekName(resolvedLocalDate.getDayOfWeek());
  9.   }
  10.  
  11.   private String convertToDayOfWeekName(DayOfWeek dayOfWeek)
  12.   {
  13.     return dayOfWeek.getDisplayName(TextStyle.FULL, Locale.getDefault());
  14.   }
  15.  
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top