ERP Fourth Shift
ERPFourthShift Public interface
Description
Describes methods and properties available on the static instance object ERP.FourthShift.
Diagram
flowchart LR classDef interfaceStyle stroke-dasharray: 5 5; classDef abstractStyle stroke-width:4px subgraph VGWWCoreIEx VGWWCoreIEx.IExERPFourthShift[[IExERPFourthShift]] class VGWWCoreIEx.IExERPFourthShift interfaceStyle; endMembers
Properties
Public properties
| Type | Name | Methods |
|---|---|---|
MFGSDateFormat | DateFormatGets or sets the format used when formatting or converting Fourth Shift data string values. | get, set |
Methods
Public methods
| Returns | Name |
|---|---|
DateTime | CVFSDate(string fsDate)Converts a Fourth Shift string formatted date based on the DateFormat. |
string | FSDate(DateTime date)Converts a date to the Fourth Shift string format based on the DateFormat. |
string | FSTime()Returns the current time in Fourth Shift string format. |
string | FSToday()Returns the current date in Fourth Shift string format based on the DateFormat. |
bool | IsShopDay(DateTime date)Determines if a given date is a shop day based on the shop calendar. |
void | SetCfg(string config)Sets the fs.config file. |
DateTime | ShopAdd(DateTime date, int count)Calculates a shop date by adding or subtracting a specified number of shop days. |
int | ShopDays(DateTime date1, DateTime date2)Calculates the number of shop days between two dates. |
Details
Summary
Describes methods and properties available on the static instance object ERP.FourthShift.
Methods
SetCfg
public void SetCfg(string config)Arguments
| Type | Name | Description |
|---|---|---|
string | config | Path to the fs.config file. |
Summary
Sets the fs.config file.
Remarks
This method must be called before using any of the shop calendar related methods.
IsShopDay
public bool IsShopDay(DateTime date)Arguments
| Type | Name | Description |
|---|---|---|
DateTime | date | The date to be evaluated. |
Summary
Determines if a given date is a shop day based on the shop calendar.
Remarks
The SetCfg method must be called prior to calling this method.
Returns
true if it is a shop day, otherwise false.
ShopAdd
public DateTime ShopAdd(DateTime date, int count)Arguments
| Type | Name | Description |
|---|---|---|
DateTime | date | The date to add shop days to. The date does not need to be a shop day. |
int | count | The number of shop days to add to the date. (Specify a negative number to subtract instead of add days.) |
Summary
Calculates a shop date by adding or subtracting a specified number of shop days.
Remarks
The SetCfg method must be called prior to calling this method.
Returns
A date which is a shop day.
ShopDays
public int ShopDays(DateTime date1, DateTime date2)Arguments
| Type | Name | Description |
|---|---|---|
DateTime | date1 | The beginning date for the calculation. |
DateTime | date2 | The ending date for the calculation. |
Summary
Calculates the number of shop days between two dates.
Remarks
The SetCfg method must be called prior to calling this method.
Returns
The number of shop days.
CVFSDate
public DateTime CVFSDate(string fsDate)Arguments
| Type | Name | Description |
|---|---|---|
string | fsDate |
Summary
Converts a Fourth Shift string formatted date based on the DateFormat.
Returns
A DateTime (or Date in VBA) value.
FSDate
public string FSDate(DateTime date)Arguments
| Type | Name | Description |
|---|---|---|
DateTime | date | The date to convert. |
Summary
Converts a date to the Fourth Shift string format based on the DateFormat.
Returns
A string representation of the date.
FSTime
public string FSTime()Summary
Returns the current time in Fourth Shift string format.
Returns
A string representation of the time.
FSToday
public string FSToday()Summary
Returns the current date in Fourth Shift string format based on the DateFormat.
Returns
A string representation of the date.
Properties
DateFormat
public MFGSDateFormat DateFormat { get; set; }Summary
Gets or sets the format used when formatting or converting Fourth Shift data string values.
Remarks
The default is mfgsFormatMDY (month, day, year). When the SetCfg method is called, this value will be automatically be set to match the Fourth Shift system configuration. China (C) and Sweden (S) will use mfgsFormatYMD (year, month, day). Britain (B) and Europe (E) will use mfgsFormatDMY (day, month, year). United States (U) will use mfgsFormatMDY (month, day, year).
Generated with ModularDoc