Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Submit minimal, parseable dates to the database. #847

Open
jniles opened this issue Oct 27, 2015 · 0 comments
Open

Submit minimal, parseable dates to the database. #847

jniles opened this issue Oct 27, 2015 · 0 comments

Comments

@jniles
Copy link
Contributor

jniles commented Oct 27, 2015

In most of the 'note' records in tables within bhima, we template in the date of the transaction. This is a useful practice, but the dates often end up rendering as a long date string rather than a nicely human readable and parseable date. Here's an example, from the purchase order creation page.

weirddates

There are several issues with this:

  1. The dates are verbose. A simple 'DD/MM/YYYY' reduces the bandwidth required to send the date and the storage capacity needed in our database dumps.
  2. They are in English, which is meaningless to the majority our clients.
  3. They are difficult to parse, so searching the text for a particular date is more difficult.

I propose we store all our dates as either a) 'DD/MM/YYYY' or 'DD-MM-YYYY' for simplicity's sake. There are already several services that do this well, notably util and DateService. We should change these dates where we find them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant