Package n10s.utils

Class DateUtils


  • public class DateUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      DateUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.time.LocalDate parseDate​(java.lang.String stringDate)  
      static java.time.LocalDateTime parseDateTime​(java.lang.String stringDateTime)
      Convert a String-formatted date into a LocalDateTime object by using LocalDateTime.parse first, and DatatypeConverter.parseDateTime if the first one fails.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateUtils

        public DateUtils()
    • Method Detail

      • parseDateTime

        public static java.time.LocalDateTime parseDateTime​(java.lang.String stringDateTime)
        Convert a String-formatted date into a LocalDateTime object by using LocalDateTime.parse first, and DatatypeConverter.parseDateTime if the first one fails.
        Parameters:
        stringDateTime - The string-formatted date.
        Returns:
        LocalDateTime object.
        Throws:
        java.lang.IllegalArgumentException - if the string is not parseable to a date.
      • parseDate

        public static java.time.LocalDate parseDate​(java.lang.String stringDate)