Adding custom date to magic dates
search cancel

Adding custom date to magic dates

book

Article ID: 48448

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

Configure DevTest VSE to add Custom Date to Magic Dates

 

Environment

All supported DevTest releases.

Resolution

Go to the following page are figure out the Java pattern for your date:

http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html

For example, the following date "Mon Dec 20 15:42:18 MST 2010" would correspond to the following date format "EEE MMM dd hh:mm:ss z yyyy".

Once you know your date format, open your VSE local.properties and add the date format property and the regex property to it. Pay an attention to the naming rules.

For example, for the date above I added the following two properties (note: everything following the = sign after lisa.vse.datechecker.EEEMMMddtimeyyyyregex represents the regex, it all should be on one line.

Lastly, ensure that your date format is added to the date priority order property. In this example, added it in front of all other date formats as follows:

lisa.vse.datechecker.date.priorityorder=lisa.vse.datechecker.EEEMMMddtimeyyyyformat&\
lisa.vse.datechecker.mmmddyyyy.separatorformat&\
lisa.vse.datechecker.mmddyyyy.separatorformat&\
lisa.vse.datechecker.ddmmmyyyy.separatorformat&\
lisa.vse.datechecker.ddmmyyyy.separatorformat&\
lisa.vse.datechecker.yyyymmmdd.separatorformat&\
lisa.vse.datechecker.yyyymmdd.separatorformat&\
lisa.vse.datechecker.mmmddyyyyformat&\
lisa.vse.datechecker.ddmmmyyyyformat&\
lisa.vse.datechecker.yyyyddmmmformat&\
lisa.vse.datechecker.yyyymmmddformat&\
lisa.vse.datechecker.ddmmmyyformat

Save this file and restart the VSE