muratgozel / node-calver

Calendar based software versioning library as node.js module and with cli support. 📅
MIT License
29 stars 5 forks source link

Do you have a plan to support timezone? #12

Closed banyan closed 2 years ago

banyan commented 2 years ago

Currently, it's fixed as UTC. do you have a plan to support timezone? I am willing to create a PR, but it's better to confirm before I do that.

muratgozel commented 2 years ago

Hey banyan, thanks for bringing this up. I think this would be an essential feature for this library. An option to specify different timezones or an option like useLocalTime... Please make a PR if you have time for it 🙏

For implementation I would add a property to the Calver class such as timezone or useLocalTime and then we would do:

import calver from 'calver';

calver.timezone = 'UTC'
// or
calver.useLocalTime = true // should be off by default for backward compatibility

if that makes sense to you also...

banyan commented 2 years ago

Thanks. Both API makes sense to me. Let me try with that.

muratgozel commented 2 years ago

awesome contribution @banyan thank you very much!

banyan commented 2 years ago

You're welcome! Thanks too!