Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8031247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:01:55+00:00 2026-06-05T01:01:55+00:00

I have date in the text format like: 6 weeks ago, 2012 April 18

  • 0

I have date in the text format like:

6 weeks ago, 2012 April 18 15:08:18
13 weeks ago, 2012 March 01 17:33:52

The main problem is that this texts are really in Russian, so instead of weeks ago there is the same text in Russian. And the same is with months (looks like I should create some dictionary of possible values).

I don’t know how to start. Should I use regular expressions? Something else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:01:58+00:00Added an answer on June 5, 2026 at 1:01 am

    Not Russian, but Polish:

    var dateStr = "6 tygodni temu, 2012 kwiecień 18 15:08:18"
    

    Firefox has no problems in extracting Unicode characters (quick & dirty regular expression):

    var regex = /(\d+) ty.* temu, (\d+) (.*) (\d+) (\d{2}):(\d{2}):(\d{2})/
    

    Parsing:

    var result = dateStr.match(regex);
    

    The result is:

    [
      "6 tygodni temu, 2012 kwiecień 18 15:08:18",
      "6",
      "2012",
      "kwiecień",
      "18", 
      "15",
      "08",
      "18"
    ]
    

    I don’t know Russian, but you might need to do some extra linguistic work. E.g. in Polish I have “1 tydzień” but “2 tygodnie” and even “5 tygodni” (mind the different form).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text like: I've got a date with this fellow tomorrow. Well
I have some text in the following format: column1 DATE, column2 VARCHAR2(6), column3 VARCHAR2(15)
I have a text field that is a date, although sometimes it also has
I have text file, like FILED AS OF DATE: 20090209 DATE AS OF CHANGE:
Hi have Date in a string Format. datevalue= [Tue Mar 06 06:00:00 CET 2012].
I have a plain text journal I'm trying to format in php. I'd like
I have a records in my table Test like this my Date column is
I have a problem with my first android widget... I am doing like this:
I have a date format that I am getting from the database and is
I have a date in this format 030512 (ddmmyy). But I'm having trouble with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.