Working with Date and Time?
I have great trouble with understanding how to work with date and time in programming (Java/JavaScript) & databases (PostgreSQL), as well as combined in some cases.
The way I understand things now is everything as a single point of data. Calculate the prime number? Just give me a number and I will give you a result. Check if a person is living in an area? Just check if his address matches with the desired area...
But dates and times? It seems to add another dimension in certain cases (simple cases of course not, like substracting current time with a specified older date time). For example, how can I check the balance of a bank account at a specific date, and then also retroactively add/subtract from his balance if the invoice is older than the current date? (e.g. I have a bunch of invoices on my desk, and I didn't enter them in the system as they come, but need to go back in time and add them to the appropriate date, and make sure the calculation of balance for a given period is valid after adding it)
The way I understand things now is everything as a single point of data. Calculate the prime number? Just give me a number and I will give you a result. Check if a person is living in an area? Just check if his address matches with the desired area...
But dates and times? It seems to add another dimension in certain cases (simple cases of course not, like substracting current time with a specified older date time). For example, how can I check the balance of a bank account at a specific date, and then also retroactively add/subtract from his balance if the invoice is older than the current date? (e.g. I have a bunch of invoices on my desk, and I didn't enter them in the system as they come, but need to go back in time and add them to the appropriate date, and make sure the calculation of balance for a given period is valid after adding it)