Time expression parsing for "First Half XX century" or "Second Half XX century"

Is there any way to parse such dates?

First Half XX century = 1900-1949

Second Half XX century= 1950-1999

Thank you!

Comments

  • edited June 2

    Not in the parser itself, no. You can add text to translate to dates in datetime.conf. Look for this block:

    # Define text expressions you wish to have the date/time parser
    # convert to dates. The text expression on the left side of the equal sign
    # must be *all lowercase* ; the date/time expression on the right side must
    # be valid and parsable
    #
    expressions = {
        us civil war = 1861 to 1865,
        world war 2 = 1939 to 1945,
        nickel empire = 1920s,
    }
    

    Maybe not the most elegant solution but if you only care about few specific centuries it could work. If you want parser support for this date format create a GitHub issue for it.



    seth

  • Ok. I will open the issue. Thank you.

    GB

  • Hello,

    Where I can see the spanish expressions of this time terms?

    Thanks.

    Silvia

  • /app/conf/datetime.conf

Sign In or Register to comment.