A wrapper for the Day.js (javascript) library.

Version 2.5

https://day.js.org/en/


Sample App:
https://visualneo.com/tutorials/neodate


Description


The neoDate plugin for VisualNEO Web is a date and time manipulation tool built on the Day.js library, providing flexible methods to work with dates in web applications. Here’s an overview of its core functionalities:

    • Date Initialization:
      • neoDateInit: Initializes the neoDate plugin and allows developers to add Day.js plugins to extend functionality.
    • Date Creation and Formatting:
      • neoDateCreate: Creates a date object from a specified date value in a specified format, storing it in a variable.
      • neoDateAsString: Converts a date object to a formatted string, allowing various output formats like MM-DD-YYYY or YYYY-MM-DD HH:mm.
    • Date Retrieval and Conversion:
      • neoDateAsArray: Outputs the date object’s components as an array.
      • neoDateAsJSON: Converts the date object to a JSON format, storing each component of the date object in a variable.
      • neoDateGet: Retrieves a specific component (e.g., year, month, day) from a date object.
    • Date Modification:
      • neoDateChange: Changes a specific date component (like hour or minute) within a date object by a set value, making it easy to adjust date or time dynamically.
    • Date Comparison and Difference Calculation:
      • neoDateDifference: Calculates the difference between two date objects in specified units (like days, hours), useful for finding durations or elapsed time.
      • neoDateQuery: Performs date-related queries (like checking if a year is a leap year or finding the number of days in a month).

The neoDate plugin enhances VisualNEO Web applications with comprehensive date manipulation and formatting, making it ideal for applications requiring date calculations, scheduling, or time-based features​​.

 

neoDateInit

Purpose:

add dayjs plugins to the main library

Category:

neoDate

Syntax:

neoDateInit

 

 

neoDateCreate

Purpose:

create a date object and populate it with a specified date

Category:

neoDate

Syntax:

neoDateCreate dateObjectVariable "dateValue" "dateValueFormat"

 

dateObjectVariable

required - name of dateObject e.g. [abcd]

dateValue

optional - value of date and time to be populated

dateValueFormat

optional - format of the dateValue string

 

neoDateAsString

Purpose:

populate the specified variable with the value of a date object, in the requested format

Category:

neoDate

Syntax:

neoDateAsString dateObjectVariable "outputFormat" outputVariable

 

dateObjectVariable

required - name of dateObject e.g. [abcd]

outputFormat

required - desired format of the date string

outputVariable

required - variable to store the date string

 

neoDateAsArray

Purpose:

populate the specified variable with the value of a date object, as an array

Category:

neoDate

Syntax:

neoDateAsArray dateObjectVariable outputVariable

 

dateObjectVariable

required - name of dateObject e.g. [abcd]

outputVariable

required - variable to store the components of the date object

 

neoDateAsJSON

Purpose:

populate the specified variable with the value of a date object, as a json object

Category:

neoDate

Syntax:

neoDateAsJSON dateObjectVariable outputVariable

 

dateObjectVariable

required - name of dateObject e.g. [abcd]

outputVariable

required - variable to store the components of the date object

 

neoDateGet

Purpose:

get the value of a date+time component from within a specified date object, and save it in a specified variable

Category:

neoDate

Syntax:

neoDateGet dateObjectVariable "dateComponent" resultVariable

 

dateObjectVariable

required - name of dateObject e.g. [abcd]

dateComponent

required - component e.g. 'hour'

resultVariable

required - variable to store result e.g. [myResult]

 

neoDateChange

Purpose:

set or adjust the value of a date+time component within a specified date object

Category:

neoDate

Syntax:

neoDateChange dateObjectVariable "changeComponent" "changeType" changeValue

 

dateObjectVariable

required - name of dateObject e.g. [abcd]

changeComponent

required - component to be changed e.g. hour or minute or year

changeType

required - changeType e.g. To or By

changeValue

required - the value to be set or adjusted for the specified component

 

neoDateQuery1

Category:

neoDate

Syntax:

neoDateQuery1 dateObjectVariable "queryType" resultVariable

 

dateObjectVariable

required - name of dateObject e.g. [abcd]

queryType

required - e.g. isLeapYear or daysInMonth

resultVariable

required - variable to store result of the enquiry

 

neoDateDifference

Purpose:

calculate the difference between two date objects in specified units and precision

Category:

neoDate

Syntax:

neoDateDifference firstDateObjectVariable secondDateObjectVariable "differenceUnit" differencePrecision resultVariable

 

firstDateObjectVariable

required - name of first dateObject e.g. [abcd]

secondDateObjectVariable

required - name of second dateObject e.g. [wxyz]

differenceUnit

required - units of difference e.g. Seconds or Days or Years

differencePrecision

required - decimal points in returned value - 0 means Integer

resultVariable

required - variable to contain the stored result

Created with the Personal Edition of HelpNDoc: Experience the power of a responsive website for your documentation