ee.Date.getFraction

নির্দিষ্ট ইউনিটের এই তারিখের অতিবাহিত ভগ্নাংশ (0 এবং 1 এর মধ্যে) প্রদান করে।

ব্যবহার রিটার্নস
Date. getFraction (unit, timeZone ) ভাসা
যুক্তি টাইপ বিস্তারিত
এই: date তারিখ
unit স্ট্রিং 'বছর', 'মাস', 'সপ্তাহ', 'দিন', 'ঘণ্টা', 'মিনিট', বা 'সেকেন্ড'-এর একটি।
timeZone স্ট্রিং, ডিফল্ট: নাল সময় অঞ্চল (যেমন, 'America/Los_Angeles'); ইউটিসি-তে ডিফল্ট।

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

var date = ee.Date('2021-4-30T07:15:31.24');

print('Elapsed fraction of a year', date.getFraction('year'));
print('Elapsed fraction of a month', date.getFraction('month'));
print('Elapsed fraction of a week', date.getFraction('week'));
print('Elapsed fraction of a day', date.getFraction('day'));
print('Elapsed fraction of an hour', date.getFraction('hour'));
print('Elapsed fraction of a minute', date.getFraction('minute'));
print('Elapsed fraction of a second', date.getFraction('second'));

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

date = ee.Date('2021-4-30T07:15:31.24')

display('Elapsed fraction of a year:', date.getFraction('year'))
display('Elapsed fraction of a month:', date.getFraction('month'))
display('Elapsed fraction of a week:', date.getFraction('week'))
display('Elapsed fraction of a day:', date.getFraction('day'))
display('Elapsed fraction of an hour:', date.getFraction('hour'))
display('Elapsed fraction of a minute:', date.getFraction('minute'))
display('Elapsed fraction of a second:', date.getFraction('second'))