PHP Classes

text2timestamp: Parses and extract times from text

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 190 All time: 8,592 This week: 673Up
Version License PHP version Categories
text2timestamp 1.0Free for non-comm...5.0PHP 5, Time and Date, Text processing
Description 

Author

This class can be used to parses and extract times of English text.

It takes a text string to analyze and recognizes time based expressions. Currently it recognizes about 20 time format variations.

The class extracts the time mentioned in the text as well the remaining action text that is related to the time expression.

Here few examples
1. 6pm call mom
2. 6:30pm call mom
3. 6:19p call mom
4. 6p call mom
5. 6am call mom
6. 6a call mom
7. 2 hours call mom
8. 2 hrs call mom
9. 30 minutes call mom
10. 30 mins call mom
11. today at 6pm call mom – the next 6pm, if 6pm has already passed.
12. Saturday 6pm call mom – The next Saturday, if Saturday has already passed
13. tomorrow at 6pm – calculates tomorrow regardless if it’s after 6pm or not.

Picture of Igor Shevchuk
Name: Igor Shevchuk <contact>
Classes: 1 package by
Country: Ukraine Ukraine
Age: ???
All time rank: 417371 in Ukraine Ukraine
Week rank: 164 Up4 in Ukraine Ukraine Up

  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file example.php Example Exampl
Plain text file text2timestamp.php Class Class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:190
This week:0
All time:8,592
This week:673Up
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1475
 
Thats a good class !
13 years ago (José Filipe Lopes Santos)
70%StarStarStarStar