Checking Dates with TSL - WinRunner

You can enhance your recorded test scripts by adding the following TSL date_ functions:

  • The date_calc_days_in_field function calculates the number of days between two date fields. It has the following syntax:

date_calc_days_in_field ( field_name1, field_name2 );

  • The date_calc_days_in_string function calculates the number of days between two numeric strings. It has the following syntax:

date_calc_days_in_string ( string1, string2 );

  • The date_field_to_Julian function translates the contents of a date field to a Julian number. It has the following syntax:

date_field_to_Julian ( date_field );

  • The date_is_field function determines whether a field contains a valid date. It has the following syntax:

date_is_field ( field_name, min_year, max_year );

  • The date_is_string function determines whether a numeric string contains a valid date. It has the following syntax:

date_is_string ( string, min_year, max_year );

  • The date_is_leap_year function determines whether a year is a leap year. It has the following syntax:

date_is_leap_year ( year );

  • The date_month_language function sets the language used for month names. It has the following syntax:

date_month_language ( language );

  • The date_string_to_Julian function translates the contents of a date string to a Julian number. It has the following syntax:

date_string_to_Julian ( string );


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics