Java Doc
This commit is contained in:
parent
deeabfd2ad
commit
f1fabad17d
@ -19,7 +19,7 @@ public class GeneralMethods {
|
|||||||
* @author Madeleine Vigier
|
* @author Madeleine Vigier
|
||||||
*/
|
*/
|
||||||
public static String getDayNumberNew(String dateString) {
|
public static String getDayNumberNew(String dateString) {
|
||||||
//https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
|
//https://stackoverflow.com/questions/8746084/string-to-localdate
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy");
|
||||||
formatter = formatter.withLocale(Locale.GERMANY); // Locale specifies human language for translating, and cultural norms for lowercase/uppercase and abbreviations and such. Example: Locale.US or Locale.CANADA_FRENCH
|
formatter = formatter.withLocale(Locale.GERMANY); // Locale specifies human language for translating, and cultural norms for lowercase/uppercase and abbreviations and such. Example: Locale.US or Locale.CANADA_FRENCH
|
||||||
LocalDate date = LocalDate.parse(dateString, formatter);
|
LocalDate date = LocalDate.parse(dateString, formatter);
|
||||||
@ -32,7 +32,7 @@ public class GeneralMethods {
|
|||||||
* The method getDayName() gets the weekday
|
* The method getDayName() gets the weekday
|
||||||
*
|
*
|
||||||
* @param dayNumber dayNumber e.g. 1 for Monday
|
* @param dayNumber dayNumber e.g. 1 for Monday
|
||||||
* @return weekday
|
* @return String weekday
|
||||||
* @author Madeleine Vigier
|
* @author Madeleine Vigier
|
||||||
*/
|
*/
|
||||||
public static String getDayName(int dayNumber) {
|
public static String getDayName(int dayNumber) {
|
||||||
|
Loading…
Reference in New Issue
Block a user