0
I am implementing in an application the time when a data was created in the database. This date information is created by the native function of the php
time()
that generates a value that is recorded in the bank as a string
. In this check has an alert when pass 72 hours without handling this information, where I take the value of string
of creation and we add the warning hours and check whether the value is greater than the time()
current. If larger, has passed the time of treatment. So far everything works normally. What happens and what I need to deduct from the check the time of the weekends, exactly at 00:00 on Saturday until 11:59:59.
Would anyone have any idea how I can do this directly through the code? At the moment the only solution I imagined in creating a pause time in the database with the initial and final values.
More accurate it is automatic. Always remove Saturdays and Sundays from a timeline where you can have several weeks
– Willian Coqueiro
I made something similar for a project, I’ll see if I can find.
– lazyFox
See if the new code I put in helps.
– lazyFox
So, everything comes on Unix timestamp. Sometimes I need to take n weeks. Not within just a month. I need to take this time line and go withdrawing Saturdays and Sundays.
– Willian Coqueiro