A quicktag that will calculate the current age of a person/animal/whatever based on it’s birthdate.
一种快速标记,它将根据人/动物/出生日期的年龄来计算该年龄。
Supports changing the verbiage for year(s) and month(s) plus has a multiplier for animals (such as “in dog years”).
支持更改年份和月份的语言动词,并具有针对动物的乘数(例如“在狗年内”)。 p>
Using the quicktag [agecalc birthdate=”1978-01-30] will display “31 years” using the default settings.
使用快捷标记[agecalc birthdate =” 1978-01-30”将使用默认设置显示“ 31岁”。 p>
Visit www.joshcook.net for update information or to submit
访问 www.joshcook.net 以获得更新信息或提交
feature and support requests.
功能和支持请求。 p>
Configuration
配置 h3>
Using the Quicktag
使用快速标记 strong> p>The Age Calculator quicktag can be used in any post or page using the following format:
年龄计算器快捷标签可以在任何帖子或页面中使用以下格式使用: p>
[agecalc birthdate=”1978-01-30″ year=”” years=”” multipliery=”” month=”” months=”” multiplierm=””]
[agecalc birthdate =” 1978-01-30” em> year =”” years =”” multipliery =”” month =”” months =”” multiplierm =””] p>The following attributes can be used within the quicktag.
可以在quicktag中使用以下属性。
Default values can be configured on the Age Calculator’s settings page.
可以在“年龄计算器”的设置页面上配置默认值。 p>
birthdate
生日 em> p>The birthdate attribute is the only manditory attribute, which has to be entered Year, Month and then Day.
生日日期属性是唯一的强制属性,必须输入年,月,日。
You can use either a .
您可以使用。
(period), a /
(forward slash) or a – (hyphen) as the seperator.
(句号), / code>(正斜杠)或–(连字符)作为分隔符。 p>Here are a few valid and invalid birthdate entries:
以下是一些有效和无效的生日日期条目: p>
- 1978-01-30 – Valid
- 1978-01-30 –有效 li>
- 1978
/
01//
30 – Valid - 1978
/ code> 01 / / code> 30 –有效 li>- 1978.01.30 – Valid
- 1978.01.30 –有效 li>
- 01-30-1978 – Invalid
- 1978年1月30日–无效 li>
- 30.01.1978 – Invalid
- 1978年3月31日–无效 li>
ul>
year
年 em> p>Sets the text that is returned when the age is 1 year.
设置年龄为1 year em>时返回的文本。 p>years
年 em> p>Sets the text that is returned when the age is more than 1 year.
设置年龄超过1岁时返回的文本。
For example, 15 years.
例如15年 em>。 p>multipliery
乘积 em> p>Used as the multiplier for the year value.
用作年份值的乘数。
For example, if you had a pet web site you could multiply the age by 7 for “dog years”.
例如,如果您有一个宠物网站,则可以将“狗年”的年龄乘以7。
I giggle every time I say “miltipliery”
每当我说“军事”时我都会咯咯笑。 p>
month
月 em> p>Sets the text that is returned when the age is 1 month.
设置年龄为1个月 em>时返回的文本。 p>months
个月 em> p>Sets the text that is returned when the age is more than 1 month.
设置年龄超过1个月时返回的文本。
For example, 5 months.
例如5个月 em>。 p>multiplierm
乘数 em> p>Used as the multiplier for the month value.
用作月份值的乘数。 p>
Age Calculator options page
年龄计算器选项页面 strong> p>Configure the default text used when the plugin returns the current age.
配置插件返回当前年龄时使用的默认文本。
All values can be overridden within the quicktag.
所有值都可以在quicktag中覆盖。 p>