Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Understanding Date Types
Understanding Date Types [message #1724185] Mon, 22 February 2016 08:20
pranay roy is currently offline pranay royFriend
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
Previous Topic:Issues with Formatter2 API and xtext 2.9.x
Next Topic:xtext 2.8 dependencies list
Goto Forum:
  


Current Time: Fri Apr 19 18:31:05 GMT 2024

Powered by FUDForum. Page generated in 0.02894 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top