Understanding Date Types [message #1724185] |
Mon, 22 February 2016 08:20 |
pranay roy Messages: 196 Registered: January 2016 |
Senior Member |
|
|
Hi ,
This is the definition of Date Type in my grammar.
Transition:
'from' dateStart=Date 'to' dateEnd=Date
;
Date:
d=Day m=Month y=Year ;
Day : INT ;
Month : 'Jan'|'Feb'|'Mar'|'Apr' ;
Year : INT ;
I wish to modify this to support flexible strings ,
for example :
from march 2012 to april 2013
from april to june
from 1st march 2011 to 4th march 2018
I would like to understand if I can have this flexibility using an xtext lib or implement my own value converter changing the Date type to String and handle all the possibilities.
http://pettergraff.blogspot.sg/2009/11/xtext-valueconverter.html
|
|
|
Powered by
FUDForum. Page generated in 0.02894 seconds