Java LocalDate Calculate stringDateToLocalDate(String day, String month, String year)

Here you can find the source of stringDateToLocalDate(String day, String month, String year)

Description

string Date To Local Date

License

Open Source License

Declaration

public static LocalDate stringDateToLocalDate(String day, String month, String year) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.LocalDate;

import java.time.format.DateTimeFormatter;

public class Main {
    public static DateTimeFormatter simpleDateFormatter = DateTimeFormatter.ofPattern("MM-dd-yyyy");

    public static LocalDate stringDateToLocalDate(String day, String month, String year) {
        final StringBuilder sb = new StringBuilder().append(month).append("-").append(day).append("-").append(year);
        return LocalDate.parse(sb.toString(), simpleDateFormatter);
    }/*from w  w  w .  jav a2  s. c  om*/
}

Related

  1. period(LocalDate startDate, LocalDate endDate)
  2. plusDays(LocalDate date, int daysToAdd)
  3. rebucketingArray(List targetDates, double[] rebucketedSensitivityAmounts, double sensitivityAmount, LocalDate sensitivityDate)
  4. roundDown(final LocalDate dateTime, final TemporalUnit temporalUnit, final int size)
  5. stream(LocalDate startInclusive, LocalDate endExclusive)
  6. stringToLocalDate(String birthDate)
  7. subscriptionDeletionRequired(LocalDate vehicleMotExpiryDate, LocalDate requestDate)
  8. toMilliseconds(LocalDate localDate)
  9. toPgDays(LocalDate date)