how to find quarter and year for xbrl document - xbrl

How can I determine the quarter and year from XML-tags of xbrl file for which it is written.
I can see that context element has period tag which has the time period for the context element :
<context id="AsOf20050603_Consol_Unaudited">
<entity>
<identifier scheme="http://www.sec.gov/CIK">796343</identifier>
</entity>
<period>
<instant>2005-06-03</instant>
</period>
</context>
<context id="From20031129-To20040604_Consol_Unaudited">
<entity>
<identifier scheme="http://www.sec.gov/CIK">796343</identifier>
</entity>
<period>
<startDate>2003-11-29</startDate>
<endDate>2004-06-04</endDate>
</period>
</context>
How can I get the time period and year at document level. Thank you

You want the time period and year at the document level - here they are:
The EDGAR Filer Manual, in section 6.5.21, defines certain mandated "dei" fields that define
1) The company's fiscal year end (CurrentFiscalYearEndDate)
2) The current fiscal year (DocumentFiscalYearFocus)
3) whather it is a Q1, Q2, Q3, "Q4" or CY (DocumentFiscalPeriodFocus)
4) and the document period end date (DocumentPeriodEndDate)
--01-31Q220132013-07-31
This should provide what you need unambiguously.

Based on the example you provided, I assume your question is about an XBRL instance that is being filed with the US SEC under the rules of the EDGAR Filer Manual. Two facts are required to be included in the document, tagged with DocumentFiscalYearFocus and DocumentFiscalPeriodFocus. Other date related facts using the DEI taxonomy are optional and should not be relied upon.
DocumentFiscalPeriodFocus will have a YYYY value, such as 2013.
DocumentFiscalPeriodFocus will have a string value Q1, Q2, Q3 in a 10-Q filing, and FY in a 10-K filing.
In the case of a non-SEC use of XBRL, there might be similar rules that require certain tags from a special taxonomy, similar to the Document Entity Information taxonomy used in EDGAR.
In the general case, you have to perform a bit of date arithmetic to find the contexts with timespans of 89-92 days (for quarters) or 364-366 days (for years), and the instant contexts that use a date that is the same as the end date of these quarterly or yearly spans. The latest of these is the span that matches most closely with the idea of the 'reporting period' if you have no other way of determining it.

Related

Relative dates in Semantic Mediawiki?

Is there a way in Semantic Mediawiki to store and use relative dates?
I would like to store genealogical data in Semantic Mediawiki and there is sometimes information like: »On January 10th 2021 John, son of the deceased Jack, married Mary.« Now I know that Jack died BEFORE 2021-01-10. Is there any way to store (and query) such information -- BEFORE 2021-01-10 -- in a date property, just like in GEDCOM format?
To store such data, you can define Record datatype:
Property:Relative date of birth:
[[Has type::Record]]
[[Has fields::Sign;Date value]]
Property:Date value:
[[Has type::Date]]
Property:Sign:
[[Has type::Text]]
[[Allows value::Before]]
[[Allows value::Exactly]]
[[Allows value::After]]
To store data, use [[Relative date of birth::Before;January 9th, 1976]].
Querying such data is not an easy task. For an exact day, use {{#ask:[[Relative sate of birth::Exactly;January 9th,1976]]}}. To query for people born before the 9th of January 1976, you need a more complicated query, or a union of queries: {{#ask:[[Relative sate of birth::Exactly||Before;<January 9th,1976]]|?Relative date of birth.Date value=date}}.
I have a set of functions for "GEDdates" I store dates with two fields, one for the date in ccyymmdd format and another for a modifier. The date can be truncated if you don't have specifics: ccyy or ccyymm. The modifiers are <, >, c, - for BEF, AFT, ABT and BTW in GEDCOM. The - is followed in the modifier field by the later date such as -ccyymm. I've recently also used the Unicode character for between ≬ (≬) which is more aligned with the data type.
This data structure gives all the flexibility needed. There are code examples at GitHub

Form Sentences in Present tense from Words

I need to convert sentences from Future tense to present tense , I could not find some straight forward way to do that .
So is it possible to break a sentence into and then re frame the sentence in present tense ?
Before :- It has been determined that in Year 2018, 1 new procedure code is to be added to Dental Related Groups
After :- Determine if in year 2018 , 1 new procedure code is added to dental Related Groups

SSRS select parameter month and change par. first and last day of this month

i need to create parameter list of months and then (after select) recalculate two others paramateres in date format ([first day] and [last day]) of this month, can you please help me?
You are querying a database server to generate the list of months, although there's no need to do that. I suggest to rather create a list of months in the report and let the report calculate the month's names, so the language depends on the Language setting of the report (which can be the language configured in the user's browser).
For example, to calculate the Label for the Value 1, use an expression like =MonthName(1).
The Parameters FirstDay and LastDay (or just the values whenever you need them) can be calculated using these expressions:
FirstDay: =DateSerial(Today.Year, Parameters!Month.Value, 1)
LastDay: =DateSerial(Today.Year, Parameters!Month.Value, 1).AddMonths(1).AddDays(-1)

Querying https://musicbrainz.org for all artists

How can I query for all artists who were born after 1720 and died before 1900 on https://musicbrainz.org?
I need to retrieve their IDs and some information about them.
Is it possible to get data in JSON format?
for those who dont want to read a long post, here is everything the OP asked for in only one query:
http://musicbrainz.org/ws/2/artist/?query=begin:[1720 TO 1900] AND end:[1720 TO 1900] AND type:"person"&fmt=json
This should return perfect results, and has got to be the best answer possible.
- all artists, born after 1720 and dead before 1900, in json format, which retrieves their IDs, and lots of information about them...
The explanation and thought process:
Since Brian's currently accepted answer includes a link to the API document, i can say it is technically complete but I don't consider pointing to the spec a the best possible answer, and can be greatly improved.
Firstly it is easy to return json by adding the json format parameter.
&fmt=json
Secondly while i don't reckon there where many boy bands back in the day, given that OP is asking about births and deaths we may conclude they are interested in only people rather than groups other types of artists.
AND type:"person"
At which point as Brian suggests another call for each end date and then filter the results taking only those who died by 1900.
If you did this you would need to do way more than 180 searches the best answer suggests, but rather one for each birth and each death year combination, so technically 1720 to 1720, all the way through 1900-1900, my math stinks but that is thousands of searches.
But what makes this still such a horrible search is because sometimes dates are either written with only the year, and then sometimes written with month date and year, so for example if you search for begin 1929 and end 1900
So if a date is written to include not only year but month/date you would not get any results for this artist because of the full birthday:
ex:
id "2b8a16a9-468f-49b0-93ea-5e6726f41643" type "Person" life-span
begin "1929-11-10"
end "1990"
ended true
Therefore in order to get any good results using only the year you would need to add the fuzzy search syntax
musicbrainz.org/ws/2/artist/?query=begin:1960~ AND end:1990~ AND
type:"person"&fmt=json
But this does nothing to solve big problem of the magnitude of searches suggested, so knowing its LUCENS based I decided to learn some LUCENS, and realize there is range syntax:
Therefor you can do all of the above with one query:
http://musicbrainz.org/ws/2/artist/?query=begin:[1720 TO 1900] AND
end:[1720 TO 1900] AND type:"person"&fmt=json
PS I recommend to start adding quotes or even url encoding your parameter values to prevent breakage.
For example leaving quotes off begin and end numerals in the example above has no problem but off the type value will fail.
First, Musicbrainz only returns XML, as far as I know, so you'll have to convert the results to JSON.
To answer your question, it doesn't look like you'll be able to get the data you want in a single call. (The following is based off the XML Web Service Search documentation.)
This call will retrieve all artists who were born in a given year:
http://musicbrainz.org/ws/2/artist/?query=begin:1720
I believe you'd need to write 180 calls (one for each year between 1720 and 1900) to get the data you need. You'd also need to manually filter out artists who died after 1900, by looking at the <end> node within <life-span>. This is because the end field will only get you artists who died in a specific year.

How to apply filter of 'date and time' attribute in rapid miner

I have one attribute named ‘rental time’ contain 2008, 2009, 2010, 2011, 2012 years of data sets of this format like “Mon Jan 14 07:32:30 CET 2008”. I want to apply filter for exclude 2008 and 2009 data. How should I apply filter in rapid miner to exclude this data.
I would be grateful to you.
Kind regards,
Sohaib
You could parse the date attribute using the function date_str_custom within the Generate Attributes operator to make a new attribute called year. It would look like this
year = date_str_custom(dateAttribute, "yyyy")
From there, you could use the Filter Examples operator to exclude examples where year is 2008 and 2009. The newly released version 6 has some enhancements to this operator to allow this filtering to be done easily. [Edit] - the RapidMiner forum mentions using this operator directly on the dateTime attribute - so it's even easier - no attribute needs to be generated.
You could refer to this blog entry for some more background.