laravel-timezone icon indicating copy to clipboard operation
laravel-timezone copied to clipboard

Add diffForHumans function

Open jonnymccullagh opened this issue 5 years ago • 2 comments

I needed a diffForHumans function that would use the user timezone, so I added this function to my local version. Created PR in case you want to amend and merge. Feel free to close if not appropriate.

jonnymccullagh avatar Oct 25 '20 19:10 jonnymccullagh

Hi @jonnymccullagh

Thanks for your contribution.

I would like to add this but I think we should do it slightly differently.

I think we should have your function call the convertToLocal function with an additional parameter.

I'll add it and you can let me know what you think.

jamesmills avatar Feb 18 '21 06:02 jamesmills

No sure what I've managed to do here but I've added the my proposed refactor here

https://github.com/jamesmills/laravel-timezone/pull/63

jamesmills avatar Feb 18 '21 09:02 jamesmills