Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duration applied before units with integer start #868

Open
cliffckerr opened this issue Mar 3, 2025 · 1 comment · May be fixed by #847
Open

Duration applied before units with integer start #868

cliffckerr opened this issue Mar 3, 2025 · 1 comment · May be fixed by #847
Labels
bug Quality: Something isn't working v3 All v3 tasks
Milestone

Comments

@cliffckerr
Copy link
Member

ss.Sim(start=2025, dur=12, unit='month').init()
Out[12]: Sim(n=10,000; 20252037)

Duration should be interpreted in months, but it's interpreted in years instead. Compare with:

ss.Sim(start='2025-01-01', dur=12, unit='month').init()
Out[15]: Sim(n=10,000; 2025-01-012026-01-01)
@cliffckerr cliffckerr added the bug Quality: Something isn't working label Mar 3, 2025
@cliffckerr cliffckerr added this to the v3-time milestone Mar 3, 2025
@cliffckerr cliffckerr added the v3 All v3 tasks label Mar 6, 2025
@RomeshA
Copy link
Contributor

RomeshA commented Mar 24, 2025

This should be fixed in #847 with

>>> ss.Sim(start='2025-01-01', dur=12).init()
Out[7]: Sim(n=10000; 2025.01.012037.01.01)

and

>>> ss.Sim(start=2025, dur=12).init()
Out[4]: Sim(n=10000; 2025.01.012037.01.01)

With the month version being

>>> ss.Sim(start=2025, dur=ss.months(12)).init()
Out[5]: Sim(n=10000; 2025.01.012026.01.01)
>>> ss.Sim(start='2025-01-01', dur=ss.months(12)).init()
Out[8]: Sim(n=10000; 2025.01.012026.01.01)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Quality: Something isn't working v3 All v3 tasks
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants