Here you can find the source of dayName(String dayNumber)
Parameter | Description |
---|---|
dayNumber | a parameter |
public static String dayName(String dayNumber)
//package com.java2s; /**/*from w w w .jav a 2s . co m*/ * Copyright (c) 2010-2018, openHAB.org and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ public class Main { /** * Convert day from number to name * * @param dayNumber * @return */ public static String dayName(String dayNumber) { String dayName = null; switch (Integer.parseInt(dayNumber)) { case (0): dayName = "Sunday"; break; case (1): dayName = "Monday"; break; case (2): dayName = "Tuesday"; break; case (3): dayName = "Wednesday"; break; case (4): dayName = "Thursday"; break; case (5): dayName = "Friday"; break; case (6): dayName = "Saturday"; break; default: dayName = "Invalid day number [" + dayNumber + "]"; } return (dayName); } }