This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:html'; | |
| void classifyDate(Element modified_at) { | |
| RegExp more_a_year = new RegExp("year"); | |
| RegExp more_5_month = new RegExp("([5-9]|1)+ months"); | |
| if (more_a_year.hasMatch(modified_at.text)) { | |
| modified_at.style.color = 'red'; | |
| }else if (more_5_month.hasMatch(modified_at.text)) { | |
| modified_at.style.color = 'orange'; | |
| } |
NewerOlder