Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for daysIn (0.12 sec)

  1. src/time/internal_test.go

    func disablePlatformSources() (undo func()) {
    	platformZoneSources = nil
    	return func() {
    		platformZoneSources = origPlatformZoneSources
    	}
    }
    
    var Interrupt = interrupt
    var DaysIn = daysIn
    
    func empty(arg any, seq uintptr, delta int64) {}
    
    // Test that a runtimeTimer with a period that would overflow when on
    // expiration does not throw or cause other timers to hang.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:37 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. src/time/time_test.go

    				time, t1)
    		}
    	}
    }
    
    var daysInTests = []struct {
    	year, month, di int
    }{
    	{2011, 1, 31},  // January, first month, 31 days
    	{2011, 2, 28},  // February, non-leap year, 28 days
    	{2012, 2, 29},  // February, leap year, 29 days
    	{2011, 6, 30},  // June, 30 days
    	{2011, 12, 31}, // December, last month, 31 days
    }
    
    func TestDaysIn(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  3. src/time/time.go

    }
    
    func daysIn(m Month, year int) int {
    	if m == February && isLeap(year) {
    		return 29
    	}
    	return int(daysBefore[m] - daysBefore[m-1])
    }
    
    // daysSinceEpoch takes a year and returns the number of days from
    // the absolute epoch to the start of that year.
    // This is basically (year - zeroYear) * 365, but accounting for leap days.
    func daysSinceEpoch(year int) uint64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 50.7K bytes
    - Viewed (0)
  4. src/time/format.go

    		}
    		day = d
    	} else {
    		if month < 0 {
    			month = int(January)
    		}
    		if day < 0 {
    			day = 1
    		}
    	}
    
    	// Validate the day of the month.
    	if day < 1 || day > daysIn(Month(month), year) {
    		return Time{}, newParseError(alayout, avalue, "", value, ": day out of range")
    	}
    
    	if z != nil {
    		return Date(year, Month(month), day, hour, min, sec, nsec, z), nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
  5. .github/workflows/team-triage-stale.yml

              days-before-issue-stale: 14
              stale-issue-label: to-triage
              stale-issue-message: ""
              days-before-issue-close: -1
    
              only-pr-labels: 'from:contributor'
              exempt-all-pr-milestones: true
              days-before-pr-stale: 14
              stale-pr-label: to-triage
              stale-pr-message: ""
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 02 09:13:16 UTC 2024
    - 835 bytes
    - Viewed (0)
  6. docs/bucket/replication/setup_ilm_expiry_replication.sh

    ./mc ilm edit --id "${id}" --expire-days "100" sitea/bucket
    sleep 30s
    
    count1=$(./mc ilm rule list sitea/bucket --json | jq '.config.Rules[0].Expiration.Days')
    count2=$(./mc ilm rule list siteb/bucket --json | jq '.config.Rules[0].Expiration.Days')
    if [ $count1 -ne 100 ]; then
    	echo "BUG: Expiration days not changed on 'sitea'"
    	exit 1
    fi
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat May 18 18:19:01 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  7. internal/bucket/lifecycle/lifecycle_test.go

    			objectName:     "foxdir/fooobject",
    			objectModTime:  time.Now().UTC().Add(-10 * 24 * time.Hour), // Created 10 days ago
    			expectedAction: NoneAction,
    		},
    		// Should remove (test Days)
    		{
    			inputConfig:    `<LifecycleConfiguration><Rule><Filter><Prefix>foodir/</Prefix></Filter><Status>Enabled</Status><Expiration><Days>5</Days></Expiration></Rule></LifecycleConfiguration>`,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  8. internal/bucket/lifecycle/rule_test.go

    				<Expiration>
    					<Days>365</Days>
    				</Expiration>
                                <Status>Enabled</Status>
    	                    </Rule>`,
    			expectedErr: errXMLNotWellFormed,
    		},
    		{
    			inputXML: `<Rule>
    				<ID>Rule with a tag and DelMarkerExpiration</ID>
    				<Filter><Tag><Key>k1</Key><Value>v1</Value></Tag></Filter>
    				<DelMarkerExpiration>
    					<Days>365</Days>
    				</DelMarkerExpiration>
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  9. internal/bucket/lifecycle/delmarker-expiration_test.go

    )
    
    func TestDelMarkerExpParseAndValidate(t *testing.T) {
    	tests := []struct {
    		xml string
    		err error
    	}{
    		{
    			xml: `<DelMarkerExpiration> <Days> 1 </Days> </DelMarkerExpiration>`,
    			err: nil,
    		},
    		{
    			xml: `<DelMarkerExpiration> <Days> -1 </Days> </DelMarkerExpiration>`,
    			err: errInvalidDaysDelMarkerExpiration,
    		},
    	}
    
    	for i, test := range tests {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  10. internal/bucket/lifecycle/delmarker-expiration.go

    import (
    	"encoding/xml"
    	"time"
    )
    
    var errInvalidDaysDelMarkerExpiration = Errorf("Days must be a positive integer with DelMarkerExpiration")
    
    // DelMarkerExpiration used to xml encode/decode ILM action by the same name
    type DelMarkerExpiration struct {
    	XMLName xml.Name `xml:"DelMarkerExpiration"`
    	Days    int      `xml:"Days,omitempty"`
    }
    
    // Empty returns if a DelMarkerExpiration XML element is empty.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top