News, Technical

PASTA’s date and time format quality check improved

PASTA’s date and time format quality check took a step out of the box this past month and used Python to assist in parsing preferred date and time formats and generating regular expression strings that are used for validating date and time data. The date and time format quality check initially relied on Java 8’s new date and time library for interpreting and validating data documented by the Ecological Metadata Language date and time schema, but inconsistencies in how Java 8 handled the ISO 8601 standard required an innovative approach to the problem. Instead of relying strictly on the Java date and time library to validate data, EDI software developers used Python’s Parsimonious package to parse and generate the preferred date and time format strings into Java 8 usable regular expressions. These Python generated “reg-exs” are used by Java to validate date and time data that are being uploaded to the EDI Data Repository. This out-of-the-box solution provides a unique, but simple solution for handling one of the most common data formats seen by EDI.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s