Class HandleDate

java.lang.Object
it.ramecera.salad.everyday.HandleDate

public class HandleDate
extends java.lang.Object

Various utility methods. Compared to the previous version, all the deprecated methods have been canceled.

Company: Rameceraâ„¢
Creation date: 2020-04-09
Last updated: 2020-04-09

Changes:

Author:
M. Maglioni
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String[] italianWeekDays
    attention, not accented vowels, for caution
    static java.lang.String[] italianWeekMonths
    months of the year
    static java.lang.String[] longTimeMonths
    length of months of the year, formatted 00
  • Constructor Summary

    Constructors 
    Constructor Description
    HandleDate()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String acconciaData_A​(java.lang.String s)
    Simple routine to transform a date from yyyymmdd to dd / MM / yyyy.
    static java.lang.String acconciaData_B​(java.lang.String s)
    Simple routine to transform a date from MM / dd / yyyy to dd / MM / yyyy.
    static java.lang.String acconciaData_C​(java.util.Date d)
    Simple routine to transform a date from date-object to month-extended g yyyy.
    static java.lang.String acconciaData_D​(long millis)
    Overload of the previous one.
    static java.lang.String acconciaData_D​(java.util.Calendar c)
    Simple routine to transform a date from date-object to dd / MM / yy.
    static java.lang.String acconciaData_D​(java.util.Date d)
    Overload of the previous one.
    static java.lang.String acconciaData_E​(long millis)
    Overload of the previous one.
    static java.lang.String acconciaData_E​(java.util.Calendar c)
    Simple routine to transform a date from Calendar object to yyyy-MM-dd.
    static java.lang.String acconciaData_E​(java.util.Date d)
    Overload of the previous one.
    static java.lang.String acconciaData_F​(java.sql.Timestamp d)
    Overload of the previous one.
    static java.lang.String acconciaData_F​(java.util.Calendar c)
    Simple routine to transform a date from date-object to dd / MM / yyyy.
    static java.lang.String acconciaData_F​(java.util.Date d)
    Overload of the previous one.
    static java.lang.String acconciaData_G​(java.util.Calendar c)
    Simple routine to transform a date from date-object to yyyymmdd.
    static java.lang.String acconciaData_G​(java.util.Date d)
    Overload of the previous one.
    static java.lang.String acconciaData_H​(long millis)
    Overload of the previous one.
    static java.lang.String acconciaData_H​(java.sql.Timestamp timestamp)
    Overload of the previous one.
    static java.lang.String acconciaData_H​(java.util.Calendar c)
    Simple routine to transform a date from date-object to dd / MM / yyyy hh: mm: ss.
    static java.lang.String acconciaData_H​(java.util.Date d)
    Overload of the previous one.
    static java.util.Date acconciaData_I​(java.lang.String s)
    Simple routine to transform a date from yyyy-mm-dd (XML standard) to a Date object
    static java.lang.String acconciaData_J​(java.util.Calendar c)
    Simple routine to transform a date from data-object to yyyymmdd_hhmmss.
    static java.lang.String acconciaData_J​(java.util.Date d)
    Overload of the previous one.
    static java.util.Date acconciaData_K​(java.lang.String s)
    Simple routine to transform a date from yyyymmdd to a Date object.
    static int acconciaData_L​(java.lang.String s)
    Simple routine to transform a date from yyyy-mm-dd (XML standard) to an 8-digit number yyyymmdd
    static java.util.Date acconciaData_M​(java.lang.String s)
    Simple routine to transform a date from dd / mm / yyyy HH.mm.ss to a Date object.
    static java.lang.String acconciaData_N​(java.util.Calendar c)
    Simple routine to transform a date from date-object to yyyy / mm / dd hh: mm: ss.
    static java.lang.String acconciaData_N​(java.util.Date d)
    Overload of the previous one.
    static java.lang.String acconciaData_O​(long millis)
    Overload of the previous one.
    static java.lang.String acconciaData_O​(java.util.Calendar c)
    Simple routine to transform a date from data-object to hh: mm: ss.
    static java.util.Date acconciaData_P​(java.lang.String s)
    Simple routine to transform a date from dd / mm / yyyy to Date object.
    static java.lang.String acconciaData_Q​(java.util.Calendar c)
    Simple routine to transform a date from date-object to yyyy / mm / dd.
    static java.lang.String acconciaData_Q​(java.util.Date d)
    Overload of the previous one.
    static java.util.Calendar ammazzaMinuti​(java.util.Calendar c)
    Set the hours, minutes, seconds and milliseconds to 0.
    static java.util.Date builtDate​(java.util.jar.Attributes attributes)
    Calculation of the date contained in a manifest such as Built-Date.
    static java.util.Calendar calPacco​(java.lang.String dayS, java.lang.String monthS, java.lang.String yearS)
    Variant of the previous one that returns a Calendar object instead of a Date.
    static java.lang.String currentDate_C()
    Production of today's date in the form dd / mm / yyyy.
    static java.lang.String currentTime_B()
    Routine to produce the current time in the form hh: mm: ss.
    static java.lang.String dataCorrente_D()
    Production of today's date in the form yyyy / MM / dd.
    static java.util.Calendar dataFluida​(java.lang.String data, java.util.Calendar dataMin, java.util.Calendar dataMax)
    Examination of a date written in a text-box.
    static java.lang.String dataPerDBMS_A​(java.util.Calendar c, java.lang.String jd)
    Overload of the previous one.
    static java.lang.String dataPerDBMS_A​(java.util.Date d, java.lang.String jd)
    Constructs the date pattern in the form yyyy mm dd differently depending on the DBMS used.
    static java.lang.String dataPerDBMS_B​(long l, java.lang.String u)
    Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used.
    static java.lang.String dataPerDBMS_B​(java.sql.Timestamp d, java.lang.String jd)
    Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used.
    static java.lang.String dataPerDBMS_B​(java.util.Date d, java.lang.String jd)
    Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used.
    static java.lang.String dataPerDBMS_C​(java.sql.Timestamp d, java.lang.String u)
    Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used.
    static java.lang.String dataPerDBMS_C​(java.util.Calendar d, java.lang.String u)
    Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used.
    static java.lang.String dataPerDBMS_D​(java.sql.Timestamp d, java.lang.String u)
    Constructs the date and time pattern in the form "yyyy MM dd hh mm ss SSS" in different ways depending on the DBMS used.
    static java.lang.String dataPerXML_A​(int i)
    Constructs a date in the XML standard, with double quotation marks, starting from a numerical date written as yyyymmmmgg (as happens on the DB Guritel).
    static boolean eDataValida​(java.lang.String data, java.lang.String format)
    Formal date check.
    static java.util.Date eLongValidDate​(java.lang.String data)
    Formal check of a written date such as: 5 September 1980.
    static java.lang.Integer[] eOraValida​(java.lang.String now)
    Formal time control.
    static java.util.Calendar formatBoxCal​(java.lang.String b)
    Transformation of a date + time as a string into a Calendar object.
    static java.sql.Timestamp formatBoxTim​(java.lang.String b)
    Variant of the previous one, produces a Timestamp object instead of a Calendar object.
    static java.util.Date pacco​(int day, int month, int year)
    Transformation of a date from three integers: day, month, year to a Date object.
    static java.util.Date pacco​(int day, int month, int year, int hours, int minutes, int seconds)
    Transformation of a date from 6 integers: day, month, year, hour, minutes, seconds to a Date object.
    static java.util.Date pacco​(java.lang.String s)
    Variant of the previous one using a single string of the type d / M / yyyy or d-M-yyyy.
    static java.util.Date pacco​(java.lang.String dayS, java.lang.String monthS, java.lang.String yearS)
    Variant of the previous one using 3 strings instead of 3 numbers.
    static java.util.Date pacco​(java.lang.String dayS, java.lang.String monthS, java.lang.String yearS, java.lang.String hoursS, java.lang.String minutesS, java.lang.String secondsS)
    Variant of the previous one using 6 strings instead of 6 numbers.
    static int quantiGiorni​(java.util.Calendar d1, java.util.Calendar d2)
    Calculation of the number of days between two dates of type Calendar, independent of the type of calendar.
    static java.lang.String quantiGiorniMese​(int mese, int anno)
    Calculation of how many days there are in a month.
    static java.util.Calendar xml​(java.lang.String s)
    Variant of the previous one using a single string of the type yyyy-mm-dd (it is also the XML standard).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • italianWeekDays

      public static java.lang.String[] italianWeekDays
      attention, not accented vowels, for caution
    • italianWeekMonths

      public static java.lang.String[] italianWeekMonths
      months of the year
    • longTimeMonths

      public static java.lang.String[] longTimeMonths
      length of months of the year, formatted 00
  • Constructor Details

  • Method Details

    • dataPerXML_A

      public static java.lang.String dataPerXML_A​(int i)

      Constructs a date in the XML standard, with double quotation marks, starting from a numerical date written as yyyymmmmgg (as happens on the DB Guritel).

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:
      08/04 08: corrected the format from # dd / MM / yyyy # to # MM / dd / yyyy #

      Parameters:
      i - the number to be transformed
      Returns:
      the date in XML format
    • dataPerDBMS_A

      public static java.lang.String dataPerDBMS_A​(java.util.Date d, java.lang.String jd)

      Constructs the date pattern in the form yyyy mm dd differently depending on the DBMS used.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:
      08/04 08: corrected the format from # dd / MM / yyyy # to # MM / dd / yyyy #

      Parameters:
      d - the date to be formatted, Date
      jd - object the jdbc of the DB server
      Returns:
      the necessary pattern
    • dataPerDBMS_A

      public static java.lang.String dataPerDBMS_A​(java.util.Calendar c, java.lang.String jd)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - the date to be formatted, Calendar object
      jd - the jdbc of the DB server
      Returns:
      the necessary pattern
    • dataPerDBMS_B

      public static java.lang.String dataPerDBMS_B​(java.util.Date d, java.lang.String jd)

      Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - the date to be formatted
      jd - the url of the DB server
      Returns:
      the necessary pattern
      Since:
      SVutensiliJ4_1.3.0
    • dataPerDBMS_B

      public static java.lang.String dataPerDBMS_B​(java.sql.Timestamp d, java.lang.String jd)

      Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - the date to be formatted
      jd - the url of the DB server
      Returns:
      the necessary pattern
      Since:
      SVutensiliJ4_1.3.0
    • dataPerDBMS_C

      public static java.lang.String dataPerDBMS_C​(java.util.Calendar d, java.lang.String u)

      Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used. Overload of dataPerDBMS_B to make use of Calendar objects instead of Date

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - the date to be formatted
      u - the url of the DB server
      Returns:
      the necessary pattern
      Since:
      SVsalad_2.0.0
    • dataPerDBMS_C

      public static java.lang.String dataPerDBMS_C​(java.sql.Timestamp d, java.lang.String u)

      Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used. Overload of dataPerDBMS_B to make use of Timestamp objects instead of Date

      Creation date: 2020-04-09
      last modified date: 2020-04-09

      Changes:

      Parameters:
      d - the date to be formatted
      u - the url of the DB server
      Returns:
      the necessary pattern
      Since:
      salad_0
    • dataPerDBMS_D

      public static java.lang.String dataPerDBMS_D​(java.sql.Timestamp d, java.lang.String u)

      Constructs the date and time pattern in the form "yyyy MM dd hh mm ss SSS" in different ways depending on the DBMS used.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - the date to be formatted
      u - the url of the DB server
      Returns:
      the necessary pattern
      Since:
      salad_0
    • dataPerDBMS_B

      public static java.lang.String dataPerDBMS_B​(long l, java.lang.String u)

      Constructs the date and time pattern in the form yyyy MM dd hh mm ss differently according to the DBMS used. It differs from the previous version in that the date is provided as a long.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      l - the date to be formatted in the form of a number of milliseconds
      u - the url of the DB server
      Returns:
      the necessary pattern
      Since:
      SVutensiliJ4_1.3.0
    • acconciaData_A

      public static java.lang.String acconciaData_A​(java.lang.String s)

      Simple routine to transform a date from yyyymmdd to dd / MM / yyyy. Old name: acconciaData0.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Parameters:
      s - string to format
      Returns:
      formatted date string
    • acconciaData_B

      public static java.lang.String acconciaData_B​(java.lang.String s)

      Simple routine to transform a date from MM / dd / yyyy to dd / MM / yyyy. Old name: acconciaData1.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Parameters:
      s - string to format
      Returns:
      formatted date string
    • acconciaData_C

      public static java.lang.String acconciaData_C​(java.util.Date d)

      Simple routine to transform a date from date-object to month-extended g yyyy.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Parameters:
      d - date to be processed
      Returns:
      date string in extended format
    • acconciaData_D

      public static java.lang.String acconciaData_D​(java.util.Calendar c)

      Simple routine to transform a date from date-object to dd / MM / yy.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Modifications:
      12/06 09: fixed error on "form" sign

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_D

      public static java.lang.String acconciaData_D​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - date to be processed
      Returns:
      date string in dd / MM / yy format
    • acconciaData_D

      public static java.lang.String acconciaData_D​(long millis)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      millis - date to be processed, expressed in milliseconds
      Returns:
      date string in format dd / MM / yy
    • acconciaData_E

      public static java.lang.String acconciaData_E​(java.util.Calendar c)

      Simple routine to transform a date from Calendar object to yyyy-MM-dd. Remember that the form yyyy-MM-dd is the XML standard for writing dates.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_E

      public static java.lang.String acconciaData_E​(long millis)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      millis - data to be processed, expressed in milliseconds
      Returns:
      date string in extended format
    • acconciaData_E

      public static java.lang.String acconciaData_E​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - date to be processed
      Returns:
      date string in yyyy-MM-dd format
    • acconciaData_F

      public static java.lang.String acconciaData_F​(java.util.Calendar c)

      Simple routine to transform a date from date-object to dd / MM / yyyy.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_F

      public static java.lang.String acconciaData_F​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - data to be processed
      Returns:
      date string in extended format
    • acconciaData_F

      public static java.lang.String acconciaData_F​(java.sql.Timestamp d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - data to be processed
      Returns:
      date string in extended format
    • acconciaData_G

      public static java.lang.String acconciaData_G​(java.util.Calendar c)

      Simple routine to transform a date from date-object to yyyymmdd.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_G

      public static java.lang.String acconciaData_G​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - data to be processed
      Returns:
      date string in extended format
    • acconciaData_H

      public static java.lang.String acconciaData_H​(java.util.Calendar c)

      Simple routine to transform a date from date-object to dd / MM / yyyy hh: mm: ss.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_H

      public static java.lang.String acconciaData_H​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - date to be processed
      Returns:
      date string in format dd / MM / yy hh: mm: ss
    • acconciaData_H

      public static java.lang.String acconciaData_H​(long millis)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      millis - date to be processed, expressed in milliseconds
      Returns:
      date string in format dd / MM / yy hh: mm: ss
    • acconciaData_H

      public static java.lang.String acconciaData_H​(java.sql.Timestamp timestamp)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      timestamp - date to be processed, expressed as timestamp
      Returns:
      date string in format dd / MM / yy hh: mm: ss
    • acconciaData_O

      public static java.lang.String acconciaData_O​(java.util.Calendar c)

      Simple routine to transform a date from data-object to hh: mm: ss.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:
      2020-04-09: changed the name from acconciaData_h to acconciaData_O

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_O

      public static java.lang.String acconciaData_O​(long millis)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      millis - data to be processed, expressed in milliseconds
      Returns:
      date string in format hh: mm: ss
    • acconciaData_I

      public static java.util.Date acconciaData_I​(java.lang.String s) throws ExactException

      Simple routine to transform a date from yyyy-mm-dd (XML standard) to a Date object

      Creation date: 2020-04-09
      last modified date: 10/21 / 10

      Parameters:
      s - string to format
      Returns:
      formatted date string
      Throws:
      ExactException - objects if the date given is incorrect
    • acconciaData_K

      public static java.util.Date acconciaData_K​(java.lang.String s) throws ExactException

      Simple routine to transform a date from yyyymmdd to a Date object.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Parameters:
      s - string to format
      Returns:
      formatted date string
      Throws:
      ExactException - object if the date provided is incorrect
    • acconciaData_L

      public static int acconciaData_L​(java.lang.String s) throws ExactException

      Simple routine to transform a date from yyyy-mm-dd (XML standard) to an 8-digit number yyyymmdd

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Parameters:
      s - the date in XML format
      Returns:
      the date as integer
      Throws:
      ExactException - objecting if the given date is incorrect
    • acconciaData_J

      public static java.lang.String acconciaData_J​(java.util.Calendar c)

      Simple routine to transform a date from data-object to yyyymmdd_hhmmss.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_J

      public static java.lang.String acconciaData_J​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - data to be processed
      Returns:
      date string in extended format
    • acconciaData_M

      public static java.util.Date acconciaData_M​(java.lang.String s) throws ExactException

      Simple routine to transform a date from dd / mm / yyyy HH.mm.ss to a Date object.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Parameters:
      s - string to format
      Returns:
      formatted date string
      Throws:
      ExactException - object if the date provided is incorrect
    • acconciaData_P

      public static java.util.Date acconciaData_P​(java.lang.String s) throws ExactException

      Simple routine to transform a date from dd / mm / yyyy to Date object.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Parameters:
      s - string to format
      Returns:
      formatted date string
      Throws:
      ExactException - object if the date provided is incorrect
    • acconciaData_N

      public static java.lang.String acconciaData_N​(java.util.Calendar c)

      Simple routine to transform a date from date-object to yyyy / mm / dd hh: mm: ss.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_N

      public static java.lang.String acconciaData_N​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - date to be processed
      Returns:
      date string in format dd / MM / yy hh: mm: ss
    • acconciaData_Q

      public static java.lang.String acconciaData_Q​(java.util.Calendar c)

      Simple routine to transform a date from date-object to yyyy / mm / dd.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - date to be processed
      Returns:
      date string in extended format
    • acconciaData_Q

      public static java.lang.String acconciaData_Q​(java.util.Date d)

      Overload of the previous one.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d - data to be processed
      Returns:
      date string in extended format
    • ammazzaMinuti

      public static java.util.Calendar ammazzaMinuti​(java.util.Calendar c)

      Set the hours, minutes, seconds and milliseconds to 0.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      c - the date to be processed
      Returns:
      the purified date of hours, minutes, seconds and milliseconds
    • currentTime_B

      public static java.lang.String currentTime_B()

      Routine to produce the current time in the form hh: mm: ss.

      Creation date: 22 / apr / 08
      Last updated: 22 / apr / 08

      Changes:

      Returns:
      the current time
    • eDataValida

      public static boolean eDataValida​(java.lang.String data, java.lang.String format)

      Formal date check. It can be customized using the format parameter.

      Creation date: 21 / Feb / 08
      Last updated: 21 / Feb / 08

      Changes:

      Parameters:
      data - obvious
      format - for example: dd-MM-yyyy
      Returns:
      true or false
    • eLongValidDate

      public static java.util.Date eLongValidDate​(java.lang.String data)

      Formal check of a written date such as: 5 September 1980.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      data - obvious
      Returns:
      true or false
    • currentDate_C

      public static java.lang.String currentDate_C()

      Production of today's date in the form dd / mm / yyyy.

      Creation date: 22 / apr / 08
      Last updated: 22 / apr / 08

      Changes:

      Returns:
      la string containing today's date
    • dataCorrente_D

      public static java.lang.String dataCorrente_D()

      Production of today's date in the form yyyy / MM / dd.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Returns:
      la string containing today's date
      Since:
      2.1.0, package 2.0.0
    • quantiGiorniMese

      public static java.lang.String quantiGiorniMese​(int mese, int anno)

      Calculation of how many days there are in a month. The month must be given as a number from 1 to 12.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes :
      2020-04-09: added the else to the if, otherwise it was an error
      2020-04-09: corrected error on the sign of "form"

      Parameters:
      mese - month, as a number from 1 to 12
      anno - a positive 4-digit number
      Returns:
      how many days; if the month is incorrect, an empty string returns
    • pacco

      public static java.util.Date pacco​(int day, int month, int year) throws ExactException

      Transformation of a date from three integers: day, month, year to a Date object. The month must be given as a number from 1 to 12.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      day - as a number from 1 to 28, 29, 30 or 31
      month - as a number from 1 to 12
      year - a 4-digit positive number
      Returns:
      l Date object; if the month is incorrect, return an empty string
      Throws:
      ExactException - exception for incorrect date
    • pacco

      public static java.util.Date pacco​(java.lang.String dayS, java.lang.String monthS, java.lang.String yearS) throws ExactException

      Variant of the previous one using 3 strings instead of 3 numbers. Transformation of a date from three integers: day, month, year to a Date object. The month must be provided as a number from 1 to 12.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      dayS - as string from 1 to 28, 29, 30 or 31
      monthS - as string from 1 to 12
      yearS - as string, 4 digits
      Returns:
      the Date object; if the month is incorrect, return an empty string
      Throws:
      ExactException - exception for incorrect date
    • calPacco

      public static java.util.Calendar calPacco​(java.lang.String dayS, java.lang.String monthS, java.lang.String yearS) throws ExactException

      Variant of the previous one that returns a Calendar object instead of a Date.

      Creation date: 2020-04-09
      last modified date: 2020-04-09

      Changes:

      Parameters:
      dayS - as string from 1 to 28, 29, 30 or 31
      monthS - as string from 1 to 12
      yearS - as string, 4 digits
      Returns:
      the Date object; if the month is incorrect, return an empty string
      Throws:
      ExactException - exception for incorrect date
    • pacco

      public static java.util.Date pacco​(java.lang.String s) throws ExactException

      Variant of the previous one using a single string of the type d / M / yyyy or d-M-yyyy. If the date is not valid, the usual ExactException is made. For practical reasons it was necessary to move from CodeExceprion to ExactException.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      s - input string
      Returns:
      the object Date
      Throws:
      ExactException - exception for null or incorrect date
    • xml

      public static java.util.Calendar xml​(java.lang.String s) throws ExactException

      Variant of the previous one using a single string of the type yyyy-mm-dd (it is also the XML standard). If the date is not valid, the usual ExactException is made. For practical reasons it was necessary to move from ExactException to ExactException.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      s - input string
      Returns:
      the object Date
      Throws:
      ExactException - exception for null or incorrect date
      Since:
      3
    • pacco

      public static java.util.Date pacco​(int day, int month, int year, int hours, int minutes, int seconds) throws ExactException

      Transformation of a date from 6 integers: day, month, year, hour, minutes, seconds to a Date object. The month must be given as a number from 1 to 12.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      day - as a number from 1 to 28, 29, 30 or 31
      month - as a number from 1 to 12
      year - a 4-digit positive number
      hours - the hours of the day
      minutes - the minutes of the hour
      seconds - the seconds of the minute
      Returns:
      the Date object; if the month is incorrect, return an empty string
      Throws:
      ExactException - exception for incorrect date
    • pacco

      public static java.util.Date pacco​(java.lang.String dayS, java.lang.String monthS, java.lang.String yearS, java.lang.String hoursS, java.lang.String minutesS, java.lang.String secondsS) throws ExactException

      Variant of the previous one using 6 strings instead of 6 numbers. Transformation of a date from 6 integers: day, month, year, hours, minutes and seconds into a Date object.

      Creation date: 2020-04-09
      Last updated: 21 / 11/08

      Changes:

      Parameters:
      dayS - as a string from 1 to 28, 29, 30 or 31
      monthS - as a string from 1 to 12
      yearS - as string, 4 digits
      hoursS - as string, 2 digits
      minutesS - as string, 2 digits
      secondsS - as string, 2 digits
      Returns:
      the Date object; if the month is incorrect, return an empty string
      Throws:
      ExactException - exception for incorrect date
    • quantiGiorni

      public static int quantiGiorni​(java.util.Calendar d1, java.util.Calendar d2)

      Calculation of the number of days between two dates of type Calendar, independent of the type of calendar.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      d1 - The first date.
      d2 - The second date.
      Returns:
      The number of days between the two dates. Zero is returned if the dates are the same, one if the dates are adjacent, etc. The order of the dates does not matter, the value returned is always >= 0. If Calendar types of d1 and d2 are different, the result may not be accurate.
    • builtDate

      public static java.util.Date builtDate​(java.util.jar.Attributes attributes) throws ExactException

      Calculation of the date contained in a manifest such as Built-Date.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      attributes - the attributes of the manifest
      Returns:
      data as object Date
      Throws:
      ExactException - exception for incorrect date
    • dataFluida

      public static java.util.Calendar dataFluida​(java.lang.String data, java.util.Calendar dataMin, java.util.Calendar dataMax)

      Examination of a date written in a text-box. It is to be used if you want to test the date just while the operator is writing it, digit by digit. The year is always 4 digits.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      data - exception for incorrect date
      dataMin - minimum acceptable value for the date
      dataMax - maximum acceptable value for the date
      Returns:
      the date, if it is valid; otherwise a null returns
    • formatBoxCal

      public static java.util.Calendar formatBoxCal​(java.lang.String b) throws ExactException

      Transformation of a date + time as a string into a Calendar object. It must be of the type g / m / yyyy hh: mm: ss or g / m / yyyy hh: mm: ss, sss or g / m / yyyy hh: mm: ss.sss.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      b - string date + time
      Returns:
      true or false
      Throws:
      ExactException - standard exception
    • formatBoxTim

      public static java.sql.Timestamp formatBoxTim​(java.lang.String b) throws ExactException

      Variant of the previous one, produces a Timestamp object instead of a Calendar object.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      b - the string date + time
      Returns:
      the object Timestamp
      Throws:
      ExactException - application exception
    • eOraValida

      public static java.lang.Integer[] eOraValida​(java.lang.String now)

      Formal time control. It must be of the type hh: mm: ss or hh: mm: ss, sss or hh: mm: ss.sss. If it is not correct, the method returns a null value.

      Creation date: 2020-04-09
      Last updated: 2020-04-09

      Changes:

      Parameters:
      now - obvious
      Returns:
      true or false