Java Day of Week findDayOfWeek(String threeLetters)

Here you can find the source of findDayOfWeek(String threeLetters)

Description

find Day Of Week

License

Open Source License

Declaration

public static DayOfWeek findDayOfWeek(String threeLetters) 

Method Source Code


//package com.java2s;
/* (c) 2017 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.//  w w w .ja va 2 s . co  m
 */

import java.time.DayOfWeek;
import java.time.format.TextStyle;
import java.util.Locale;

public class Main {
    public static DayOfWeek findDayOfWeek(String threeLetters) {
        for (DayOfWeek dow : DayOfWeek.values()) {
            if (threeLetters.equals(dow.getDisplayName(TextStyle.SHORT, Locale.ENGLISH))) {
                return dow;
            }
        }
        return null;
    }
}

Related

  1. dayOfWeekFromInt(final int theDay)
  2. dayOfWeekFromInteger(String aDay, boolean longName)
  3. dayOfWeekNames()
  4. endOfWeek(Date inDate, TimeZone timeZone)
  5. extractDayOfWeek(Date date)
  6. firstDateAfterAddWeeks(Date early, int weeks)
  7. firstDayOfWeek()
  8. getAllDaysDateBetween(Date startDate, Date endDate, DayOfWeek dayOfWeek)
  9. getBounceDateofWeek(Date date)