# man > Date::Manip::Config(3pm)

---
type: CommandReference
command: Date::Manip::Config
mode: perldoc
section: 3pm
source: perldoc
---

## Quick Reference

- `$date->config("Language","Russian")` — set language for date parsing
- `$date->config("ConfigFile","/path/to/config.cnf")` — load config file
- `$date->config("setdate","now,Europe/Rome")` — set current time zone to Europe/Rome
- `$date->config("forcedate","now")` — freeze current time (never advances)
- `Date_Init("Language=German")` — functional interface equivalent
- `$date->config("DateFormat","US")` — set date format (US vs non-US)
- `$date->config("WorkDayBeg","08:00")` — define workday start
- `$date->config("Defaults","1")` — reset all config to defaults

## Name

Date::Manip::Config - Date::Manip configuration

## Synopsis

Configuration is stored in a `Date::Manip::Base` object. Set via:

perl
$date->config($var1, $val1, $var2, $val2, ...);
or when creating an object:

perl
$date = new Date::Manip::Date [$var1, $val1, ...];
Functional interface:

perl
Date_Init("$var1=$val1");
Config files may be used via the `ConfigFile` variable.

## Options

### Basic Configuration

- `Defaults` — reset all config variables to defaults (value ignored)
- `ConfigFile` — path to config file; may be given multiple times
- `Language` — language for parsing dates (case insensitive); see `Date::Manip::Lang`
- `Encoding` — character encoding for input/output (e.g., `iso-8859-1`, `utf-16`, `perl`)
- `FirstDay` — first day of week (1=Monday, 7=Sunday); default Monday
- `Jan1Week1` — if non-zero, week 1 always contains Jan 1 (ignores ISO 8601)
- `Printable` — output format: 0=YYYYMMDDHH:MN:SS (default), 1=YYYYMMDDHHMNSS, 2=YYYY-MM-DD-HH:MN:SS

### Date Parsing

- `DateFormat` — "US" interprets 12/10 as Dec 10; any other value as Oct 12
- `YYtoYYYY` — how to expand 2-digit year: integer N (CURR-N to CURR+99-N), "C" (current century), "C##" (specific century), "C####" (specific 100-year period)
- `DefaultTime` — "midnight" (00:00:00) or "curr" (current time) when time not given
- `PeriodTimeSep` — if 1, allow period (.) as time separator (e.g., 12.15.30)
- `Format___MMMYYYY` — "first" or "last" to interpret "Jun 1925" as first/last day of June 1925

### Business Mode

- `WorkWeekBeg` / `WorkWeekEnd` — first and last day of work week (1=Monday, 7=Sunday); default Mon-Fri
- `WorkDay24Hr` — if non-zero, work day is 24 hours; ignores WorkDayBeg/End
- `WorkDayBeg` / `WorkDayEnd` — start and end times of work day (e.g., "08:00", "17:00")
- `TomorrowFirst` — if 0, look "yesterday" first when finding nearest business day; default 1
- `EraseHolidays` / `EraseEvents` — erase current holiday/event lists (value ignored)

### Recurrence

- `RecurRange` — default range for recurrences: "none", "year", "month", "week", "day", "all"
- `MaxRecurAttempts` — maximum attempts to find matching dates before assuming invalid recurrence

### Time Zone

- `SetDate` — set current date/time/zone, allowing time to advance using time zone rules. Syntax: `"now[,ZONE]"`, `"zone[,ZONE]"`, `"DATE[,ZONE]"`. DSTFLAG optional: `"std"`, `"dst"`, `"stdonly"`, `"dstonly"`.
- `ForceDate` — same as SetDate but "now" never changes (frozen time)
- `TZ` (deprecated) — use `SetDate` or `ForceDate` instead

## Examples

**Set language and use config file:**

perl
$date->config("Language","German");
$date->config("ConfigFile","/home/user/Manip.cnf");
**Functional interface:**

perl
Date_Init("Language=Russian");
Date_Init("ConfigFile=/home/user/Manip.cnf");
**Set time zone to Europe/Rome with current system time:**

perl
$date->config("setdate","now,Europe/Rome");
**Freeze current time for testing:**

perl
$date->config("forcedate","now");
**Sample config file (`Manip.cnf`):**

DateFormat = US
Language   = English

*Holidays

Dec 25 =  Christmas
Jan 1  =  New Year's
## See Also

- [Date::Manip](https://metacpan.org/pod/Date::Manip)
- [Date::Manip::Base](https://metacpan.org/pod/Date::Manip::Base)
- [Date::Manip::TZ](https://metacpan.org/pod/Date::Manip::TZ)
- [Date::Manip::Date](https://metacpan.org/pod/Date::Manip::Date)
- [Date::Manip::Delta](https://metacpan.org/pod/Date::Manip::Delta)
- [Date::Manip::Recur](https://metacpan.org/pod/Date::Manip::Recur)
- [Date::Manip::Lang](https://metacpan.org/pod/Date::Manip::Lang)
- [Date::Manip::Holidays](https://metacpan.org/pod/Date::Manip::Holidays)
- [Date::Manip::Objects](https://metacpan.org/pod/Date::Manip::Objects)