# Current progress with explicit due date
# Note that output will depend on date the function is run
how_far(due_date = "2025-12-01")
# Progress on a specific date
how_far(on_date = "2025-11-01", due_date = "2025-12-01")
# With custom person
how_far(on_date = "2025-11-01", due_date = "2025-12-01", person = "Sarah")
# Set global options
date_opt <- getOption("pregnancy.due_date") # save current option
set_due_date("2025-12-01")
how_far()
options(pregnancy.due_date = date_opt) # return original option
Run the code above in your browser using DataLab