Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow "1d-ago" style input in date boxes.

We already allowed "1d ago", but the URLs use a dash instead, so allow
that too.

Change-Id: I45cd09c018289cfd6c60b979bec7bf1ff3ec3b12
  • Loading branch information...
commit e2e1dc7e15f43f1c2ec20a0f5be736cb5ca1a8e6 1 parent 5461b41
Benoit Sigoure tsuna authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  src/tsd/client/DateTimeBox.java
2  src/tsd/client/DateTimeBox.java
@@ -53,7 +53,7 @@
53 53 public Date parse(final DateBox box,
54 54 final String text,
55 55 final boolean report_error) {
56   - if (text.endsWith(" ago")) { // "1d ago" and such
  56 + if (text.endsWith(" ago") || text.endsWith("-ago")) { // e.g. "1d ago".
57 57 int interval;
58 58 final int lastchar = text.length() - 5;
59 59 try {

0 comments on commit e2e1dc7

Please sign in to comment.
Something went wrong with that request. Please try again.