Class

Week

Week(weekData)

Constructor

# new Week(weekData)

Represents a week.
Parameters:
Name Type Description
weekData WeekData The data for the week.
date DateResolvable Use any DateResolvable for this.

View Source structures/stalks/weeks/Week.js, line 15

Members

Advice

# readonly advice

Contains all of your predictions and suggestions for the week, based on what you've entered.

View Source structures/stalks/weeks/Week.js, line 115

boolean

# buyLocalFirstTime

Whether or not this is the first that turnips have been bought from your island.

View Source structures/stalks/weeks/Week.js, line 51

Array.<Buy>

# buys

The list of buys were made.

View Source structures/stalks/weeks/Week.js, line 43

Date

# date

The sunday that the week started on.

View Source structures/stalks/weeks/Week.js, line 28

Array.<FriendWeek>

# friendWeeks

A list of all your friends that have entered data for the corresponding week.

View Source structures/stalks/weeks/Week.js, line 128

number

# id

The id of the week.

View Source structures/stalks/weeks/Week.js, line 21

number

# localPrice

The price Daisy Mae was selling turnips for on your specific island, regardless of where you purchased from.

View Source structures/stalks/weeks/Week.js, line 72

string

# manualPreviousPattern

The pattern you had last week.

View Source structures/stalks/weeks/Week.js, line 86

string

# readonly previousPattern

Allows you to explicitly state what your pattern was last week.
Should be one of "big_spike", "small_spike", "triple", or "decreasing".

View Source structures/stalks/weeks/Week.js, line 96

Array.<number>

# prices

A list of prices for each slot. null values can be used for missing prices.

View Source structures/stalks/weeks/Week.js, line 79

number

# readonly profit

Your calculated profit for the week.

View Source structures/stalks/weeks/Week.js, line 105

Array.<Sell>

# sells

Just like buys, this is a list because you can track multiple sales.

View Source structures/stalks/weeks/Week.js, line 58

number

# version

A sanity check that prevents an outdated frontend from overwriting newer data on the server.

View Source structures/stalks/weeks/Week.js, line 140

Methods

# static getDateSunday(date) → {Date}

Returns the sunday of the week.
Parameters:
Name Type Description
date DateResolvable

View Source structures/stalks/weeks/Week.js, line 220

Date

# toJSON() → {WeekData}

Serializes the Week to a JSON.

View Source structures/stalks/weeks/Week.js, line 148

WeekData