Java TimeUnit Usage parseDate(String value)

Here you can find the source of parseDate(String value)

Description

parse Date

License

Open Source License

Declaration

public static int parseDate(String value) 

Method Source Code

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

import org.joda.time.format.DateTimeFormatter;

import org.joda.time.format.ISODateTimeFormat;

import java.util.concurrent.TimeUnit;

public class Main {
    private static final DateTimeFormatter DATE_FORMATTER = ISODateTimeFormat.date().withZoneUTC();

    public static int parseDate(String value) {
        return (int) TimeUnit.MILLISECONDS.toDays(DATE_FORMATTER.parseMillis(value));
    }//from   w  w w .java  2s .  c  o  m
}

Related

  1. nanosToHMSms(long nanos)
  2. nanosToSecs(long nanos)
  3. nanoToString(final long nanos)
  4. now()
  5. numberOfDaysSinceEpoch(long milliSinceEpoch)
  6. parseDuration(String durationStr)
  7. parseDuration(String text)
  8. parseRelativeTimeInSeconds(String relativeTime)
  9. parseSecondsFromEpoch(Double d)