> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NSTimeZoneRule

> Information about a rule for a TimeZone.

Information about a rule for a TimeZone.

## Constructors

### NSTimeZoneRule()

```crmscript theme={null}
NSTimeZoneRule
```

Initializes a new instance of the NSTimeZoneRule class.

## Methods

## GetEndDay()

```crmscript theme={null}
Integer GetEndDay()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Custom DST end day, if 0 then parse startRule.

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer endDay = thing.GetEndDay();
```

## GetEndMonth()

```crmscript theme={null}
Integer GetEndMonth()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Custom DST end month, if 0 then parse startRule.

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer endMonth = thing.GetEndMonth();
```

## GetEndRulePattern()

```crmscript theme={null}
String GetEndRulePattern()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - DST end rule, such as 2300 LST-SAT-OCT; limited to rules that we have parse code for; use dayOfMonth etc for custom rules.

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
String endRulePattern = thing.GetEndRulePattern();
```

## GetStartDay()

```crmscript theme={null}
Integer GetStartDay()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Custom DST start day, if 0 then parse startRule.

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer startDay = thing.GetStartDay();
```

## GetStartMonth()

```crmscript theme={null}
Integer GetStartMonth()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Custom DST start month, if 0 then parse startRule.

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer startMonth = thing.GetStartMonth();
```

## GetStartRulePattern()

```crmscript theme={null}
String GetStartRulePattern()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - DST start rule, such as 0200 1ST-SUN-APR; limited to rules that we have parse code for; use dayOfMonth etc for custom rules.

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
String startRulePattern = thing.GetStartRulePattern();
```

## GetTZOffset()

```crmscript theme={null}
Integer GetTZOffset()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Number of minutes bias relative to UTC time.

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer tZOffset = thing.GetTZOffset();
```

## SetEndDay(Integer)

```crmscript theme={null}
Void SetEndDay(Integer endDay)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer endDay;
thing.SetEndDay(endDay);
```

## SetEndMonth(Integer)

```crmscript theme={null}
Void SetEndMonth(Integer endMonth)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer endMonth;
thing.SetEndMonth(endMonth);
```

## SetEndRulePattern(String)

```crmscript theme={null}
Void SetEndRulePattern(String endRulePattern)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
String endRulePattern;
thing.SetEndRulePattern(endRulePattern);
```

## SetStartDay(Integer)

```crmscript theme={null}
Void SetStartDay(Integer startDay)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer startDay;
thing.SetStartDay(startDay);
```

## SetStartMonth(Integer)

```crmscript theme={null}
Void SetStartMonth(Integer startMonth)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer startMonth;
thing.SetStartMonth(startMonth);
```

## SetStartRulePattern(String)

```crmscript theme={null}
Void SetStartRulePattern(String startRulePattern)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
String startRulePattern;
thing.SetStartRulePattern(startRulePattern);
```

## SetTZOffset(Integer)

```crmscript theme={null}
Void SetTZOffset(Integer tZOffset)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTimeZoneRule thing;
Integer tZOffset;
thing.SetTZOffset(tZOffset);
```


## Related topics

- [SuperOffice.WebApi.Data.TimeZoneRuleDictionary](/en/api/reference/webapi/SuperOffice.WebApi.Data.TimeZoneRuleDictionary.md)
- [SuperOffice.WebApi.Data.TimeZoneRule](/en/api/reference/webapi/SuperOffice.WebApi.Data.TimeZoneRule.md)
- [NSTimeZoneData](/en/automation/crmscript/reference/CRMScript.NetServer.NSTimeZoneData.md)
- [SuperOffice.WebApi.Data.TimeZoneData](/en/api/reference/webapi/SuperOffice.WebApi.Data.TimeZoneData.md)
- [Get Base Time Zone](/en/api/reference/restful/rest/timezone/get-base-time-zone.md)
- [Get Current Time Zone](/en/api/reference/restful/rest/timezone/get-current-time-zone.md)
