Java Day Name dayName(String dayNumber)

Here you can find the source of dayName(String dayNumber)

Description

day Name

License

Open Source License

Declaration

public static String dayName(String dayNumber) 

Method Source Code

//package com.java2s;
/*//ww w .  j  av  a2 s  .  co  m
 Copyright FILE Mauro Cicolella, 2012-2013
    
 This file is part of FREEDOMOTIC.
    
 FREEDOMOTIC is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
    
 FREEDOMOTIC is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
    
 You should have received a copy of the GNU General Public License
 along with Freedomotic.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    public static String dayName(String dayNumber) {
        String dayName = null;
        switch (new Integer(Integer.parseInt(dayNumber))) {
        case (0):
            dayNumber = "Sunday";
        case (1):
            dayNumber = "Monday";
        case (2):
            dayNumber = "Tuesday";
        case (3):
            dayNumber = "Wednesday";
        case (4):
            dayNumber = "Thursday";
        case (5):
            dayNumber = "Friday";
        case (6):
            dayNumber = "Saturday";
        }
        return (dayName);
    }
}

Related

  1. dayName(String dayNumber)
  2. getCurrentDayName()
  3. getDayName()
  4. getDayName(int i)
  5. getDayName(String code)