| 开发者 | calculatorio |
|---|---|
| 更新时间 | 2026年11月6日 10:55 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[ci_date_calculator].
What you enter: Start Date, End Date, Years, Months, Weeks, Days, Holiday, Month, Day.
What you get: Date, shown in years, months, weeks, days, hours, minutes, seconds.
Features:
[ci_date_calculator] shortcode to a page or post.Add the shortcode [ci_date_calculator] to a page or post. In the block editor use a Shortcode block. In a theme template use <?php echo do_shortcode( '[ci_date_calculator]' ); ?>.
title (1 or 0), theme (light, dark or auto), accent (a hex colour such as #2563eb) and max_width (for example 720px, 80% or 40rem). See the Usage section for examples. Invalid values are ignored and the default is used instead.
Use theme="dark" for always dark, or theme="auto" to follow the visitor's light/dark system setting. The default, theme="light", keeps the calculator light on any background.
Yes. Use title="0" and the heading with the calculator's icon is not printed, so you can write your own.
No. The calculation happens in the visitor's browser, nothing they enter leaves the page, and the plugin makes no requests to calculator.io or any other external service. It sets no cookies and loads no ads or trackers.
The frame adjusts its height automatically while the page is open. If your theme or a caching or optimisation plugin removes scripts from the page, the frame keeps a default height; exclude the plugin's ci-embed.js file from script optimisation.
Open the date calculator, which auto-fills the Start Date and End Date with today's date, then change the End Date to your target date and press Calculate. It returns the exact number of days without any mental math or manual counting of days per month.
Click the Settings button next to the Calculate button and choose to exclude weekends and public holidays from the total. This leaves you with only the working days between the two dates.
Set the End Date to today and the Start Date to the earlier date, such as an anniversary or a milestone event, then press Calculate. The tool shows exactly how much time has passed between them.
A leap year adds an extra day (February 29), so the same date range can be one day longer. For example, the span from January 23 to April 5 is 72 days normally but 73 days in a leap year.
Yes. Besides excluding weekends and public holidays in Settings, you can manually exclude individual dates, such as personal vacation days or sick leave, by adding them at the bottom of the tool before you calculate.
title, theme (light, dark, auto), accent and max_width